// GET: Developers/Delete/5
        public async Task <IActionResult> Search(SearchObjectDevelopers searchObject)
        {
            var pageSize = 10;
            var model    = await _developerService.Search(searchObject);

            return(View("~/Views/Developers/Index.cshtml", PaginatedList <Developer, SearchObjectDevelopers> .Create(model, 1, pageSize, searchObject)));
        }
        // GET: Developers
        public async Task <IActionResult> Index(int?pageNumber)
        {
            var pageSize = 10;
            var model    = await _developerService.GetAllDevelopers(pageNumber, pageSize);

            SearchObjectDevelopers searchObject = new SearchObjectDevelopers();

            return(View(PaginatedList <Developer, SearchObjectDevelopers> .Create(model, pageNumber ?? 1, pageSize, searchObject)));
        }
示例#3
0
        public async Task <IActionResult> Search(SearchObjectDevelopers searchObject)
        {
            try
            {
                var model = await _developerService.Search(searchObject);

                return(Ok(model));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }
示例#4
0
 public async Task <IEnumerable <Developer> > SearchAsync(SearchObjectDevelopers searchObject)
 {
     return(await _dbContext.Developers
            .Where(developer => developer.Name.Contains(searchObject.Name))
            .ToListAsync());
 }
 public async Task <IEnumerable <Developer> > SearchAsync(SearchObjectDevelopers searchObject)
 {
     return(await _repository.SearchAsync(searchObject));
 }
示例#6
0
 public async Task <IEnumerable <Developer> > Search(SearchObjectDevelopers searchObject)
 {
     return(await _businessLogicDevelopers.SearchAsync(searchObject));
 }