public IActionResult Get() { try { try { var results = new ObjectResult(_projectsRepository.GetAll()) { StatusCode = (int)HttpStatusCode.OK }; Request.HttpContext.Response.Headers.Add("X-Total-Count", _projectsRepository.GetAll().Count().ToString()); return(results); } catch (Exception ex) { log.WriteLog(ex.ToString(), "ProjectsController.txt"); return(BadRequest()); } } catch (Exception ex) { log.WriteLog(ex.ToString(), "ProjectsController.txt"); return(BadRequest()); } }
public IActionResult Index(string nameFilter, int pageNo) { var pagingInfo = GetPagingInfo(pageNo); PagedList <Project> projects = projectsRepo.GetAll(nameFilter, pagingInfo); ViewBag.NameFilter = nameFilter; return(View(nameof(Index), projects)); }
public async Task <IEnumerable <Project> > GetAll() { _logger.LogDebug("Getting all Projects."); IEnumerable <Project> projects = await _projectsRepository.GetAll(); foreach (Project project in projects) { project.Complete = await _tasksRepository.AllTasksAreCompleted(project.ProjectName); } return(projects); }
public IEnumerable <Customer> GetAll() { return(_projectsRepository.GetAll()); }
public List <ProjectDto> GetAll() { return(_projectsRepository.GetAll()); }
public IEnumerable <Product> Get() { return(_projectsRepository.GetAll()); }