public async Task <IActionResult> Get() { var account = _accountRepository.Query().Select(a => new Account { AccountId = a.AccountId, Number = a.Number, AccountTypeId = a.AccountTypeId, Purpose = a.Purpose, Alert = a.Alert, Balance = a.Balance, CustomerId = a.CustomerId, Days = a.Days, Status = a.Status, AccountType = _accounttypeRepository.Query().FirstOrDefault(t => t.AccountTypeId == a.AccountTypeId), Customer = _customerRepository.Query().FirstOrDefault(t => t.CustomerId == a.CustomerId) }); return(Ok(account)); }
public async Task <IActionResult> Get() { var accounttype = _accounttypeRepository.Query(); return(Ok(accounttype)); }