public ActionResult Post(Postrental postRental)
        {
            var rental = new Rental(postRental);

            context.Rentals.Insert(rental);
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public Rental(Postrental postRental)
 {
     Description = postRental.Description;
     RoomCount   = postRental.RoomCount;
     Price       = postRental.Price;
     Address     = (postRental.Address ?? string.Empty.Split('\n').ToList());
 }