Last active
March 30, 2017 07:12
-
-
Save stpriyanka/d9dd5ac86d222a07abcce5b22acd731a to your computer and use it in GitHub Desktop.
Manual map data between viewmodel and entity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BusinessLogic | |
{ | |
public CompanyDTO CompanyDto { get; set; } | |
public CompanyDM CompanyDm { get; set; } | |
public BusinessLogic(CompanyDTO dto, CompanyDM dm) | |
{ | |
CompanyDto = dto; | |
CompanyDm = dm; | |
} | |
public CompanyDM MapData() | |
{ | |
CompanyDm.CompanyName = CompanyDto.CompanyName; | |
CompanyDm.CompanyAddress = CompanyDto.CompanyAddress; | |
CompanyDm.ContactPersonName = CompanyDto.ContactPersonName; | |
CompanyDm.ContactPersonEmail = CompanyDto.ContactPersonEmail; | |
CompanyDm.CompanyCreatedAt = CompanyDto.CompanyCreatedAt; | |
CompanyDm.HasMultipleBranch = CompanyDto.HasMultipleBranch; | |
CompanyDm.VAT = CompanyDto.VAT; | |
return CompanyDm; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment