Example #1
0
 public static Reservation ToModel(this ReservationViewModel vm, UserProfile profile)
 {
     return new Reservation()
     {
         Id = vm.Id,
         ActivityPackageId = vm.ActivityPackage.Id,
         UserId = vm.User.Id,
         Message = vm.Message,
         AuditInfo = new AuditInfo(profile.ApplicationUser.Id),
     };
 }
Example #2
0
 public static IEnumerable<Reservation> ToModel(this IEnumerable<ReservationViewModel> reserations, UserProfile profile)
 {
     return (from r in reserations select r.ToModel(profile)).ToList();
 }