コード例 #1
0
 public static AddressViewModel MapEntityAddressToViewModel(this IndividualsAndAddresses entity)
 {
     return(new AddressViewModel()
     {
         Id = entity.AddressId ?? 0,
         AddressLine1 = entity.AddressLine1,
         AddressLine2 = entity.AddressLine2,
         City = entity.City,
         State = entity.State,
         Zip = entity.Zip,
         IndividualId = entity.Id
     });
 }
コード例 #2
0
 public static IndividualViewModel MapEntityToViewModel(this IndividualsAndAddresses entity)
 {
     return(new IndividualViewModel()
     {
         Email = entity.Email,
         FirstName = entity.FirstName,
         MiddleName = entity.MiddleName,
         LastName = entity.LastName,
         Id = entity.Id,
         Addresses = new List <AddressViewModel>()
         {
             entity.MapEntityAddressToViewModel()
         }
     });
 }