public async Task <IActionResult> GetById(int id) { var view = await viewRepository.GetById(id); if (view != null) { return(Ok(new { Results = view })); } else { return(BadRequest(new { Errors = new { Code = "InvalidId", Description = "Invalid Id!" } })); } }
public View Get(int viewId) { var view = viewRepository.GetById(viewId); return(view); }