Where to put Business Logic classes in an Entity Framework - ASP.NET MVC 4 Solution?

asp.net-mvc, asp.net-mvc-4, c#, entity-framework

Solution

You can create different projects according to core functionality.

Data Access Layer(DB context and repository etc.) you can make Project.DataAccess, it will have only db context class and repository.

Business Logic Layer(Project.Business) it will have business logic and make call to data access layer.

UI Layer(Project.WebUi) it is mvc project. and so on.

for detail info you can see this http://prodinner.codeplex.com/ code

Problem

I have a Solution with one project is Entity Framework and have my ASP MVC project, I looking for some advice or opinion about the idea of create in top of my POCO objects and the DBContext, a Business Logic Layer with static classes that have the all the methods (example a ContactBLL class with GetContactByID, GetAllContacts, GetContactsByType) to allow the access to the model data and that can be accessed in the Controllers Actions. In that way I don't have to put the implementation code of this methods in Controller Actions methods, and it can be reusable invoking this methods in other Action Controllers. I will appreciate your opinion because it could guide me to respond a question I've asking to myself around a week based in the answer to this one (about where to define the DBContext and how use it).

Original source