1

I am new to MVC and started working on a small application.

I have a basic idea about what to do and want to use MVC and EntityFramework.

I want to create a separate Business Layer.

I want to put all the Model declaration in business layer and want to put the entire business logic in that.

From MVC Web Application Controller will make request to that Business library.

Please guide me. Is it possible or I am in wrong direction?

closed as too broad by Robert Harvey, user40980, GlenH7, gnat, Arseni Mourzenko Mar 16 '15 at 15:43

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

1

Yes, keep your business logic in its own assembly. This will help to keep your layers separate. Don't let purely UI concerns creep in there, and don't let your data layer leak through in anyway. The idea is that when MVC / Razor is no longer the current way to build your web app, you can throw away your UI layer and keep your business rules, which is where your real value is. The same goes for your data layer; at some point EF will not be the way to go, and you want to be able to throw it away without it having any impact on your UI layer (since the business layer talks to the data layer somehow, it will have some impact there).

Not the answer you're looking for? Browse other questions tagged or ask your own question.