"The preferred way is to simply copy the database into your project. So, from the project menu, right click and choose “Add new item“ or “Add existing item“. In either case the MDF (and LDF if present) is copied into your project. Then a connection is automatically opened for you in Server Explorer. So, you can directly party on the database structure.
SSE supports a connection style where you do not specify the logical database name. You simply leave it blank in the connection string and one is generated for you automatically on the fly (based on the unique path of the MDF in the directory structure). When your app closes down (app domain), the MDF is auto-closed which leaves the MDF in a copyable state.
So, you can build your app and directly reference the MDF that will be in the same directory as your .exe. When you hit F5, the project system builds your .exe/dlls and copies the MDF to the output directory. When your app runs, it directly references the MDF that is in same directory as your exe (or relative to it). When your app spins down and the app domain closes, both your executables and your database are Xcopyable (mailable, zippable, whatever ...) to the destination of your choice."
I definitely recommend you check out the rest of the post. It has a lot of great information.