public ActionResult ServiceList() { var services = _servService.GetAllServices().Where(x => x.IsInUse); if (services != null) { var model = new List <ServiceListViewModel>(); foreach (var service in services) { model.Add(new ServiceListViewModel() { Id = service.Id.ToString(), ServiceName = service.ServiceName, Properties = service.Properties, MinPrice = service.TariffList.Min(x => x.Price) }); } return(View(model)); } else { return(View()); } }
// GET: Content/ServiceIndex public ActionResult ServiceIndex() { var services = _servService.GetAllServices(); return(View(services)); }