2

hi I want to use Entity Framework for my Application. With my Application I create a Helpdesk Ticket and I want do this without install a Database on the server. for this I want to create only a file with the database data and content.

For SQL Server Express can I use mdf files. Is it possible to create a file how mdf or something.

The models are finish and I have a Context.

I ask this because a workmate ask me. He find it better if the application (asp.net mvc) start and on the server would be create a database file that save in a seperade folder, that I can select by the installation.

Have I a Change to do this?

Tarasov
  • 3,625
  • 19
  • 68
  • 128
  • 1
    If you want schema and data you can let context generate model and then use SSMS to detach mdf or generate scripts from the database (in advanced dialog choosing "Schema and data" for an option "types of data to script". Otherwise if you are only interested in schema you can use migrations. http://stackoverflow.com/questions/13939404/generate-full-sql-script-from-ef-5-code-first-migrations – Uber Bot Oct 14 '15 at 21:58
  • Also look at SQL Server LocalDB available from SQL2012 and higher: https://msdn.microsoft.com/en-us/library/hh510202.aspx – Eris Oct 14 '15 at 22:10

0 Answers0