locked
EDMX approach - is it good to use it or should i check for something more "up to date" ? RRS feed

  • Question

  • User46076047 posted

    For new application i am going to develop, should i use EDMX approach or its kind of old and i should check for something else?

    Tuesday, November 28, 2017 2:31 PM

All replies

  • User1120430333 posted

    Myself, I prefer DB first, because I don't like making those objects.

    Wednesday, November 29, 2017 7:14 AM
  • User991499041 posted

    Hi OmTechGuy,

    For new application i am going to develop, should i use EDMX approach or its kind of old and i should check for something else?

    From my point of view, choosing the appropriate approach is purely based on the applications you are developing. 

    Database First Approach:

    Advantages:

    1. Simple to create the data model.
    2. Graphical  user interface.
    3. Mapping and creation of keys and relationships are easy as you need not have to write any code .
    4. Preferred for data intense and large applications

    Disadvantages:

    1. Using an existing database to generate a .edmx model file and the associated code models results in a giant pile of auto generated code.
    2. When you need to add any functionality to generated model you have to extend the model class generated. 

    Regards,

    zxj

    Wednesday, November 29, 2017 7:27 AM
  • User-832373396 posted

    Hi OmTechGuy,

    I suggest that you could use code first of Entity Framework.

    For new application I am going to develop,

    Til now, the newest entity framework is EF Core, that 's for .net core(MVC6).

    and in EF core, the only way is code first, no DB first, or Model first; But there is something command to generate Model files for existing database. 

    So, for your new application, I suggest that you could choose code first mode

    Resources:

    learn the EF from Microsoft Official Document:

    Overview:

    https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/ef/overview 

    More references:

    1 Entity Framework (EF) Documentation(Data developer Center)

    https://msdn.microsoft.com/en-us/data/ee712907(vs.113) 

    2 Microsoft Virtual Academy(Videoes)

     Implementing Entity Framework with MVC

    https://mva.microsoft.com/en-US/training-courses/implementing-entity-framework-with-mvc-8931?l=e2H2lDC3_8304984382 

    3 MSDN document and videoes   

    Entity Framework Development Workflows Video

    https://msdn.microsoft.com/en-us/data/jj590134 

    Entity Framework Relationships and Navigation Properties

    https://msdn.microsoft.com/en-us/library/jj713564(v=vs.113).aspx   

    Introduction to Entity Framework

    https://msdn.microsoft.com/en-us/library/aa937723(v=vs.113).aspx   

    Entity Framework Fluent API - Relationships

    https://msdn.microsoft.com/en-us/library/jj591620(v=vs.113).aspx 

    4 Entityframeworktutorial site

    http://www.entityframeworktutorial.net/code-first/entity-framework-code-first.aspx

    With regards, Angelina Jolie

    Wednesday, November 29, 2017 9:21 AM