public ActionResult Action(int?ID) { AccomodationPackagesActionModel model = new AccomodationPackagesActionModel(); if (ID.HasValue) { var accomodationPackage = accomodationPackagesService.GetAllAccomodationPackageByID(ID.Value); model.ID = accomodationPackage.ID; model.Name = accomodationPackage.Name; model.NoOfRoom = accomodationPackage.NoOfRoom; model.FeePerNight = accomodationPackage.FeePerNight; } return(PartialView("_Action", model)); }