public async Task <IActionResult> GetById(string id) { var model = await _operation.GetByIdAsync(id); if (model == null) { return(new JsonResult("Data not found") { StatusCode = 401 }); } return(Ok(model)); }
public async Task <SampleModel> GetById(string Id) { return(await _operation.GetByIdAsync(Id)); }