public IHttpActionResult GetServiceDescriptions() { var idUser = _userIdentityService.Id; var serviceDescriptions = _serviceDescriptionService.GetAllByOwnerUser(idUser); var serviceDescriptionsResponseModel = _mapper.Map <ServiceDescriptionCollection_ApiResponseViewModel>(serviceDescriptions); return(Ok(serviceDescriptionsResponseModel)); }
public ActionResult Index() { ViewBag.LoggedInUserFullName = UserFullName; var serviceDescriptions = _serviceDescriptionService.GetAllByOwnerUser(IdUser); var serviceDescriptionsViewModel = Mapper.Map <List <ServiceDescription_MvcViewModel> >(serviceDescriptions); if (serviceDescriptionsViewModel != null && serviceDescriptionsViewModel.Count() == 0) { AddToastWarningMessage(WebResource.NoServiceDescriptionInDatabase); } return(View(serviceDescriptionsViewModel)); }