Back to list
Views:   17.1K
Replies:  2

When shall I use Entity Framework?

In the Design Pattern Framework 4.0 you use Entity Framework for data access.
Why did you choose to use Entity Framework in your product?

Could you please let me know when we should use Entity Framework vs any other data access technology?
What are common alternatives to Entity Framework?

Ba Si, Jul 10, 2012
Reply 1
Hi, Ba.

When the Brass gives you and your team enough time to thoroughly create a decent model, then start thinking EF. OR/M has always been a pipe dream for those that have to "just get it done". Microsoft is the latest player in a game that's seen other players come and go.

If you've been given that luxury then use it in conjuction with the SQL server admin, or whomever writes the SQL database, because you're going to need to map. If you get a decent synergy going then coding the problem domain is much more intuitive, which really is only effective in a team environment.

Just my opinion.

Michael Lopez, Aug 04, 2012
Reply 2
Entity Framework is used by default in the Design Pattern Framework 4.0, but in fact, it ncludes 3 data access technologies:

    1) Entity Framework (EF)
    2) LINQ-to-SQL
    3) ADO.NET 

EF can easily be swapped out by LINQ to SQL or ADO.NET in the Framework..  These are popular options, but another popular alternative, not included in the Design Pattern Framework, is NHibernate.

Microsoft's position is that EF is the way to go.  LINQ-to-SQL is pretty much an unsupported product by now.  If performance is critical to your app, you should consider ADO.NET as this allows you to fine-tune your SQL exactly to your needs.  The way I see it is that EF is always a bit of a black box with respect to the SQL that is generated under the hood.

Hope this helps.
Dan McMillan, Jul 11, 2012
Hi Thanks for your reply. I have added _ViewStart.cshtml file into my Area "Admin" under view folder. but it it calling my _layout.cshtml in the top level root folder and It is not calling View\Home\Index.cshtml file from root top level, here only I had my master layout information. Initial run It is calling root View\Home\Index.cshtml file with my exact master page information when I will click link @Html.Menu("departments","departments","Admin", new { area="Admin"}) which has specified in the above index file, this will available in the Area="Admin" view is opening without calling my master layout informaiton. Please advice how to use View\Home\Index.cshtml file with Area view. Thanks for your reply
Jul 25, 2011
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.