Fat model / thin controller vs. Service layer [closed]

All of this depends on the intention and requirements of your application. That said, here’s my suggestion for “mid scale” (not a local restaurant, and not Twitter/Facebook) web applications. Lean Domain Modeling Dry POCO style objects, preferably ignorant to the MVC architecture of your web application to remain as loosely coupled from your particular implementation … Read more

Difference between Repository and Service Layer?

Repository Layer gives you additional level of abstraction over data access. Instead of writing var context = new DatabaseContext(); return CreateObjectQuery<Type>().Where(t => t.ID == param).First(); to get a single item from database, you use repository interface public interface IRepository<T> { IQueryable<T> List(); bool Create(T item); bool Delete(int id); T Get(int id); bool SaveChanges(); } and … Read more