Monday, October 17, 2016

Entity Framework Database First vs Entity Framework Code First connection strings

If you look on http://connectionstrings.com, unfortunately, you will not find sample connection strings for Entity Framework (either Database First or Code First).

Most developers that initially started working with Entity Framework, probably have been using Entity Framework Database First and therefore are familiar with the common lengthy connection string as follows:



However, the Entity Framework Code First connection strings follow the more standard ADO.NET model for database connection strings such as the following:


You can read more about the differences between the 2 Entity Framework models here: https://msdn.microsoft.com/en-us/data/jj556606%28v=vs.113%29.aspx?f=255&MSPPError=-2147217396

No comments:

Post a Comment