Search code examples
c#databaseentity-frameworkasp.net-coreentity-sql

difference between EF and Entity-SQL when working with .net core


I am beginner to .net core. And I am working on an enterprise application where there are multiple classes interfaces for multiple project inside a one solution. i know Entity Framework won't be a good idea if we are facing huge number of wrappers. But indeed its giving me efficiency of coding. On the other side of it Entity SQL has its own benefits.

But still want to really understand the best practice and which one to implement when it comes to Enterprise application knowing it will have number of classes, Data filtration, Generic Types, Flexibility, performance vise when querying DB.

Looking forward to get some really helpful understanding from experts. Thanks in advance.


Solution

  • TL;DR;

    The "best practices" depends on the use case. Its a set of tools, not a silver bullet.


    Sometimes EF works for your case, sometimes not. Sometimes you want a monolith, sometimes you dont.

    Try, experiment fail and succeed.

    Best practices regarding to techniques are irrelevant; implementation change all the time. So;

    • define functional requirements
    • define none functional requirements
    • do a PoC with some relevant loads etc.

    At enterprise level consider these additional properties:

    • security
    • operational functionality
    • cloud / none-cloud

    This is the best I can do, given your question.

    Explain the case and we could give some direction; but its not a template fitted for all cases.