Пример #1
0
 public Rental(PostRental postRental)
 {
     Description = postRental.Description;
     NoOfRooms = postRental.NoOfRooms;
     Price = postRental.Price;
     Address = (postRental.Address ?? string.Empty).Split('\n').ToList();
 }
Пример #2
0
 public ActionResult Post(PostRental postRental)
 {
     var rental = new Rental.Rental(postRental);
     Context.Rentals.Insert(rental);
     return RedirectToAction("Index");
 }