Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any advantage for Entity Framework generic repository?

I am new with the entity framework architecture. I have try to make some sample code with the edmx file, but now I want to write the generic code for the entity framework, and I want to know that any advantage of to write this generic code. Because there are so many methods which is already provided by the entity frameworks objects.

Please let me know your answer, because your answer will become more helpful in my new project development.

like image 709
Mayur Desai Avatar asked Nov 25 '25 12:11

Mayur Desai


1 Answers

If you're new to the entity framework architecture then you can start it from Code-First development.

What is Code-First ?

You can,

  1. Develop without ever having to open a designer or define an XML mapping file

  2. Define your model objects by simply writing “plain old classes (poco)” with no base classes required

  3. Use a “convention over configuration” approach that enables database persistence without explicitly configuring anything

  4. Optionally override the convention-based persistence and use a fluent code API to fully customize the persistence mapping

You can follow very good light weigh MVC Music Store Application Here

You can get more knowledge about Code-First Development with Entity Framework 4 Here

I hope this will help to you.

like image 137
Sampath Avatar answered Nov 27 '25 01:11

Sampath



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!