public IActionResult Edit(int id) { ServiceTypeServiceModel serviceType = this.serviceTypesService.GetById(id); if (serviceType.Name == null) { return(this.BadRequest()); } var model = new ServiceTypeInputModel { Id = serviceType.Id, ServiceTypeName = serviceType.Name, IsShownInMainMenu = serviceType.IsShownInMainMenu, ServiceTypeDescription = serviceType.Description, }; return(this.View(model)); }
public IActionResult Details(int id) { ServiceTypeServiceModel serviceType = this.serviceTypesService.GetById(id); if (serviceType.Name == null) { return(this.BadRequest()); } var model = new ServiceTypeDetailsViewModel { Id = serviceType.Id, Name = serviceType.Name, Description = serviceType.Description, IsShownInMainMenu = serviceType.IsShownInMainMenu == true ? "Да" : "Не", // TODO: Add Services table }; return(this.View(model)); }