public Account Get(int id) { var account = _accountRepository.Get(x => x.Id == id); account.Currency = _currencyService.Get(account.CurrencyId); account.Directory = _directoryService.Get(account.DirectoryId); return(account); }
public async Task <IActionResult> Get() { ArticleDirectory?record = await _directoryService.Get(); if (record == null) { return(NotFound()); } _logger.LogTrace($"{nameof(Get)}"); return(Ok(record)); }
public async Task <ActionResult> Get(Guid Id) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } try { return(Ok(await _service.Get(Id))); } catch (ArgumentException ex) { return(StatusCode((int)HttpStatusCode.InternalServerError, ex.Message)); } }
public ActionResult <Directory> Get([FromQuery] int id) { return(_directoryService.Get(id)); }