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