public ActionResult Action(int?ID) { AccomodationTypesActionModel model = new AccomodationTypesActionModel(); if (ID.HasValue) { var accomodationType = accomodationTypesService.GetAllAccomodationTypeByID(ID.Value); model.ID = accomodationType.ID; model.Name = accomodationType.Name; model.Description = accomodationType.Description; } return(PartialView("_Action", model)); }