I was wondering how one incorporates a DAL and BAL into a WPF application that uses MVVM. Suppose I have an object called Rectangle in which it persists it name, length and width to a database or file. Now suppose that another class uses the rectangle and wants to calculate either the area or perimeter. Should I have both a RectangleDAL and a RectangleBAL in which the RectangleDAL just has fields for Width and Length and the RectangleBAL has the additional fields for Area and Perimeter or should the area and perimeter properties be part of the RectangleViewModel class? Should the classes in the DAL only have fields/properties that it will persist or can it have more information? Are the DAL and BAL extensions what developers typically use?
↧