public ActionResult <Client> Get(Guid key) { try { return(Ok(_clientServices.Get(key))); } catch (Exception exception) { _logger.LogError(exception, exception.Message); return(new StatusCodeResult(500)); } }
public IHttpActionResult Get([FromUri] string clientNumber, [FromUri] string companyId) { try { if (!ModelState.IsValid) { return(BadRequest()); } var oStaffProfile = _clientService.Get(clientNumber, companyId); if (oStaffProfile != null) { return(Ok(oStaffProfile)); } return(NotFound()); } catch (Exception ex) { LogHelper.Log(ex); return(InternalServerError(ex)); } }
public async Task <Client> Get(string id) { return(await Task.Run(() => { return _clientServices.Get(id); })); }