Search code examples
c#architectureprojects-and-solutions

Model Class purposes and position in solution


I think that Model class has couple of variations.

  1. Once fetched from repository - for example this class

  2. Convert it to your app needs and hand it to the business logic - might be different class (loose couple of DB representation)

  3. convert it before sending it to UI

where do you locate all those models? in one "Model" folder? or everyone in its own layer?


Solution

    1. It's a Model, and m be located in DAL project
    2. It's a BO (Business object), and might be located in BL (Business Logic) project
    3. It's a ViewModel and might be located in presentation project (Web for example)