Beispiel #1
0
 public Rental(PostRental postRental)
 {
     Description = postRental.Description;
     NumberOfRooms = postRental.NumberOfRooms;
     Price = postRental.Price;
     Address = (postRental.Address ?? string.Empty).Split('\n').ToList();
 }
        public ActionResult Post(PostRental postRental)
        {
            var rental = new Rental(postRental);
            context.Rentals.Insert(rental);
            return RedirectToAction("Index");

            //return View();
        }