I am developing an ASP.NET MVC application, and I have three projects:
UI (with the system.web.mvc reference, BL and DAL references)
BL (business facade and business objects)
DAL (contains my entities/poco classes and connects to the DB using an external assembly)
I am building my viewmodels in the UI layer, using the data contained in my DAL entities, so my UI has reference to BLL and DAL, but I'm not sure if a DAL reference should exist in the UI project.
I was thinking about creating a class in the BL layer That uses the data contained in the DAL entities, and then creating my viewmodels using the new class, but it seems very repeatitive and redundant.
What do you guys think? What I want to do is to build my viewmodels using data contained in data base