Hi All,
Can someone let me know which Design Pattern are we using?. Our application has Presentation Layer, Business layer and Data layer. The data is exchanged between these three layers using corresponding objects. We have developed a separate class library which holds only the "Properties", i.e. DTOs (Data Transfer Objects with just get and set accessors). The business layer and data layer has manager class to perform operation on data.
Sample code below:
Presentation Layer
btnSave_Click(sender, object)
{
// Class from the class library which has only properties
UserInfo userInfo = new UserInfo();
userInfo.FirstName = txtFirstName.Text;
userInfo.LastName = txtLastName.Text;
// Object of business layer
UserManager userMngr = new UserManager();
userMngr.Save(userInfo);
}
Business Layer
UserManager class
public bool Save(UserInfo userInfo)
{
// Performs business logic here if any
// Data access layer object
UserDataManager dataMngr = new UserDataManager();
return dataMngr.Save(userInfo);
}
Data Layer
UserDataManager class
public bool Save(UserInfo userInfo)
{
// Inserts the data to DB
}
DataObjectsLibrary (the library where UserInfo class exist)
UserInfo class
public class UserInfo
{
public string FirstName { get;set;}
public string LastName { get;set;}
}
====
I am looking for a pattern name for this.
Thanks