The text of this article is not in this database — only its details are. Read it on the old site: CRUD using the Repository Pattern in MVC
36 Comments
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
The text of this article is not in this database — only its details are. Read it on the old site: CRUD using the Repository Pattern in MVC
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
Dinesh GabhanePosted Nov 12, 2019, 6:45 AM
Very Nice Article
Devinder KaurPosted Sep 18, 2019, 2:13 AM
Can you share the sample database
Shiv Ratan KumarPosted Jul 26, 2019, 11:34 PM
Save method should not be in the IRepository interface. You can use for Save is Unit of Work
Hitanshi MehtaPosted Jul 8, 2019, 2:59 PM
Thank you so much for this article!!! It helped me alot!! please keep posting such article !!!
Aniket NarvankarPosted Dec 16, 2018, 4:29 AM
Very Nice Article
Satyaki ChakrabortyPosted Dec 12, 2018, 12:36 PM
As per martin fowler the book of the design patterns, the repository should not have save , update and here you are using updatebook methods, how ? can u explain?
First LastPosted Nov 3, 2018, 10:31 AM
How is the database name determined? I see you called your application BookStore, but I called mine CrudWithRepositoryPattern. However, the database name is still BookStore. Also, I am using VS 2015, MVC 5 and EF 6. I choose the MVC template as the Internet template is not there. I do not use authentication. ---->> Is it using the Catalog name in the web.config file - ConnectionString? Such as Catalog=BookStore. Here's my entry in the web.conf file: <connectionStrings> <add name="BookStoreConnectionString" connectionString="Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=BookStore;Integrated Security=True;MultipleActiveResultSets=true" providerName="System.Data.SqlClient" /> </connectionStrings>
Sajad AhangerPosted Jun 19, 2018, 5:22 AM
Nice article to get start with.....
jamshed alamPosted Mar 15, 2018, 1:38 AM
Very useful and helpful articles
Arvind ChourasiyaPosted Oct 23, 2017, 10:55 AM
Hi Sir, Very nice and informative article. Here I want know that Repository class is tightly coupled to Book entity then how it would be useful as a generic way? Thank you sir
Sandeep Singh ShekhawatPosted Jan 6, 2016, 11:38 AM
Welcome shaik muzammel
shaik muzammelPosted Jan 6, 2016, 7:07 AM
Thanks sandeep
Tejesh BabuPosted May 20, 2015, 6:52 AM
Hi Sandeep, Thanks a lot for the wonderfull article. I just started in MVC and this was a perfect tutorial to begin with repository concept. i was able to execute this perfectly. its very encouraging too....
Gowtham RajamanickamPosted Mar 13, 2015, 5:21 AM
good..
shailesh narbariyaPosted Dec 10, 2014, 3:01 PM
Awesome Article, Clearly Explain Everything, Good One....
vinodh kumarPosted Jul 9, 2014, 9:01 AM
Thanks a lot very good article
Sandeep Singh ShekhawatPosted May 6, 2014, 12:11 AM
Thank you so much @Ricardo Aranibar
Ricardo AranibarPosted May 5, 2014, 6:39 PM
good article
Sandeep Singh ShekhawatPosted Aug 7, 2013, 3:19 AM
Sir, It is a basic example where i am using single Book entity it just describe flow of entity and repository with DataContext. It's real benefit we look whenever we implements generic repository where a single repository handle all curd operation for different entity and no need define code for mulitple time for each entity for insert update delete etc.
Rajesh Prasad GuptaPosted Aug 7, 2013, 3:13 AM
With Repository pattern, here you have got a layer on the top of Entity Framework. This layer does the job of delegating the requests to the BookContext instance. The pattern looks straight forward but I could not understand the advantage of this pattern in this example. How is coupling getting reduced here? All I could think is that with this pattern I got a contract to write code to ( abstraction).Am I missing something? Please advise.
Sourav KayalPosted Aug 3, 2013, 9:38 AM
good article and nice discussion.
anil babuPosted Aug 2, 2013, 6:09 AM
I want to insert images also,How can i do this,please give that code also
Sandeep Singh ShekhawatPosted Aug 1, 2013, 5:51 AM
Thanks for nice comments.
Jagan MohanPosted Aug 1, 2013, 4:42 AM
Very Nice & Most Explanatory Article
Former memberPosted Jul 31, 2013, 6:14 AM
Nice article, and nice explanation
Venkatesh KumarPosted Jul 29, 2013, 9:29 AM
Good Post
Akhil MittalPosted Jul 29, 2013, 5:16 AM
Nice Article, This topic is in my article series pipeline.U explained the topic well.Will soon complete my article series on MVC, I think I should refer this article as fourth part in my series. :-)