Now we have covered all of our CRUD actions. Using EF allows you to act on the data layer without using Stored procedures for all of your CRUD actions.
Now you have seen how EF gives you access to existing objects, but what if we want to extend one of those objects or even add an Interface to one of them so that we can use Dependency Injection? Well EF uses partial classes to construct all of the entities and models. So we can extend them or wrap them in interfaces by making our own object of the same name.
In conclusion: EF is a wrapper for your Database and with the ability to create our objects from existing tables we can quickly write code to do any action needed against the database. We also get our existing stored procedures so you don't have to "reinvent the wheel".
Robert T. Frey
Now you have seen how EF gives you access to existing objects, but what if we want to extend one of those objects or even add an Interface to one of them so that we can use Dependency Injection? Well EF uses partial classes to construct all of the entities and models. So we can extend them or wrap them in interfaces by making our own object of the same name.
Robert T. Frey
No comments:
Post a Comment