public async Task <IActionResult> GetByIdAsync(int Id)
        {
            IDataResult <Firm> FirmResult = await _Firmservice.FindByIdAsync(Id);

            if (FirmResult.Success)
            {
                return(Ok(FirmResult.Data));
            }
            else
            {
                return(BadRequest(FirmResult.Message));
            }
        }
Exemplo n.º 2
0
 public async Task <IActionResult> GetById(int id)
 {
     return(HandleServiceResponse(await _service.FindByIdAsync(id)));
 }