public async Task <IActionResult> list() { try { var list = new List <IdeasVM>(); var result = _IdeaService.GetAll(); if (result != null) { foreach (var item in result) { //Todo, put your mapping implementation here } return(this.Ok(await Task.FromResult(list))); } return(NotFound()); } catch (Exception xcp) { //log error return(Ok(Enumerable.Empty <IdeasVM> ().AsQueryable())); } }
public async Task <IActionResult> GetAll(PagingParameters pagingParameters) { List <Idea> ideas = await _ideaService.GetAll(pagingParameters); return(Success(ideas.MapList(IdeaModelMapper.MapToIdeaResponseViewModel))); }
public ActionResult GetAll() { return(new OkObjectResult(_service.GetAll())); }