示例#1
0
 public static BLLAppUserDTO FromDALParticipantDTO(DALRowParticipantDTO participantDTO)
 {
     if (participantDTO == null)
     {
         throw new NullReferenceException("Can't map, DALRowParticipantDTO is null");
     }
     if (participantDTO.AppUserId == null)
     {
         throw new NullReferenceException("Can't map, DALRowParticipantDTO AppUserId property is null");
     }
     return(new BLLAppUserDTO()
     {
         Id = participantDTO.AppUserId.Value,
         Nickname = participantDTO.Name
     });
 }
 /// <summary>
 /// Maps LoanId, ReceiptRowId, LoanRowId, Involvement, Name
 /// </summary>
 /// <param name="dto"></param>
 /// <returns></returns>
 /// <exception cref="NullReferenceException"></exception>
 public static BLLRowParticipantDTO FromDAL(DALRowParticipantDTO dto)
 {
     if (dto == null)
     {
         throw new NullReferenceException("Can't map, DALRowParticipantDTO is null");
     }
     return(new BLLRowParticipantDTO()
     {
         Name = dto.Name,
         LoanId = dto.LoanId,
         ReceiptRowId = dto.ReceiptRowId,
         Involvement = dto.Involvement,
         AppUserId = dto.AppUserId,
         LoanRowId = dto.LoanRowId
     });
 }