Exemple #1
0
 public static Account MapAccountFromDTO(AccountDTO accountDTO)
 {
     if (accountDTO != null)
     {
         return(new Account
         {
             AccountID = accountDTO.AccountID,
             Login = accountDTO.Login,
             Password = accountDTO.Password,
             Balance = accountDTO.Balance,
             FirstName = accountDTO.FirstName,
             LastName = accountDTO.LastName,
             Type = AccountTypeMapper.MapAccountTypeFromDTO(accountDTO.Type)
         });
     }
     else
     {
         throw new ArgumentNullException();
     }
 }