I want to ask where to put Insert, update delete methods using stored procedure. as i added class library for Dataaccess and business logic class.. and referenced this class library in my mvc 4 project. Now i want to know where to put insert , update ,delete methods eitherin mvc project model or in class library BL class
Asked
Active
Viewed 691 times
2 Answers
1
You can don it in where ever like in controller or model or in a separate class itself.
If you using it in Model just method call function is enough form controller. MVC provide as in In-dependency to create our model and db calling methods in different areas.

Aravindan
- 855
- 6
- 15
1
You should put the Insert, update , delete etc methods in the Business layer and in Controller, just call the methods from Business layer. The data access should never interact directly with the Controller or the presentation layer. (These are the good programming ethics since they provide security to the application and data)

Naveen Chandra Tiwari
- 5,055
- 3
- 20
- 26
-
you mean that 'i should put insert,update etc in BL and call them in controller? – ASP.Net Developer Jan 13 '15 at 19:23
-
Yes.. in controller you should just call these methods and the whole logic should be written in BL. – Naveen Chandra Tiwari Jan 14 '15 at 05:26