public Task <Office> GetAsync(int id, IRequestContext context, CancellationToken cancellation) { try { return(Task.FromResult(_repository.Get(id).ToOfficeResource())); } catch (Exception) { throw; } }
public IActionResult Delete(int id) { var todelete = _repository.Get(id); if (todelete != null) { _repository.Delete(todelete); return(Helper.CheckResult(todelete, true)); } return(NotFound()); }
public ModelResponse Get(long id) { OfficeVm r; try { r = Repo.Get(id); if (r == null) { return(new ModelResponse(101)); } } catch (Exception ex) { return(new ModelResponse(ex)); } return(new ModelResponse(0, r)); }
public object Get(DataSourceLoadOptions loadOptions) { return(DataSourceLoader.Load(_officeRepo.Get(), loadOptions)); }
public async Task <Office> GetOffice(int id) { var entidad = await _officeRepository.Get(id); return(OfficeMapper.Map(entidad)); }
public async Task <Office> Get(int id) { var office = await _officeRepository.Get(id); return(OfficeMapper.Map(office)); }