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));
        }
Exemple #3
0
        public async Task <IEnumerable <TransactionTypeModel> > GetAll()
        {
            var transactions = await _transactionTypeService.GetAll();

            return(_mapper.Map <IEnumerable <TransactionTypeModel> >(transactions));
        }