Entity Framework Database First

The Entity Framework was originally designed to make working with existing databases easier. As a result, the database first workflow is the most polished version of the three options. Given an existing database, the Entity Framework can analyze it, provide you with options for importing partially or all of the structure, and then create the model automatically. The underlying objects are automatically generated as well. All that developer really needs to worry about is creating the application itself; the database access is pretty much handled by the Entity Framework. In general, this feature of the Entity Framework works incredibly well and is quite fast

The most significant advantage of the database first workflow (besides being incredibly fast) is its consistency. Having a means of producing consistent model is important in a large team setup. Team members can work on various parts of the database and the resulting model will still go well together because it was produced in a consistent manner in the first place.

Be aware, this is also the least flexible method of creating the underlying objects used by the .NET Framework as part of your application. The development team gains the least knowledge of precisely how things work. In fact, the objects begin as a black box that could cause you problems later if the Entity Framework encounters some oddity in the original database. To make changes to the underlying objects, you also have to rely on working with extensions, rather than modify the code directly, because the automation overwrites any changes you make. This leads to problems of figuring out just which file to look in for changes.

Copyright © All Rights Reserved - C# Learners