Hi Friends,
Recently, I was writing the infrastructure part of My Movie Review SPA app using ASP.NET Core version. Then, I landed in really weird situation where in DBSet.Find() piece is missing. This is really crucial extension method for finding the record based on the primary key. In order to find the solution, I thought it would be nice to talk to EF Guru Julie Lerman directly. Here, is what I asked her and what she replied on the same.
Don't understand why DbSet.Find method is not included by default in EF Core 7.0.0-rc1-final. Should i write extension myself @julielerman
— rahul sahay (@rahulsahay19) March 25, 2016
Dbset find will be in later release of #efcore. Roadmap on EF github wiki,is a great resource! /@rahulsahay19 https://t.co/Clc3WEG1Dz
— Julie Lerman (@julielerman) March 25, 2016
Here, at this point I got the confirmation, this feature is yet to be included by EF Team. Hence, I decided to use the interim solution provided by the EF Team themselves. Below is the extension method which I have written to serve the same result.
And, here is the completed Repository Pattern for my project.
Now, below is the glimpse of the solution structure so far for my Movie Review SPA coming up using ASP.NET Core, WEB-API, Angular JS, Entity Framework and tons of new things.
I hope you would have liked this discussion. Thanks for joining me.
Thanks,
Rahul Sahay
Happy Coding