public async Task <ActionResult <IEnumerable <TransactionTypeModel> > > GetTransactionTypes() { var result = await _transactionTypeService.GetAll(); if (result.Any()) { return(Ok(result)); } return(NoContent()); }
public IHttpActionResult GetSelectList() { var transTypes = _transactionTypeService.GetAll(); if (transTypes == null) { return(Content(HttpStatusCode.NotFound, $"No status record were found.")); } return(Ok(transTypes)); }
public async Task <IEnumerable <TransactionTypeModel> > GetAll() { var transactions = await _transactionTypeService.GetAll(); return(_mapper.Map <IEnumerable <TransactionTypeModel> >(transactions)); }