Reputation: 331
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
Upvotes: 0
Views: 717
Reputation: 5123
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)
Upvotes: 1
Reputation: 855
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.
Upvotes: 1