Beispiel #1
0
        //[Route("api/expensegroups")]
        public IHttpActionResult Get(int id)
        {
            try
            {
                var expenseGroup = _repository.GetById(id);

                if (expenseGroup == null)
                {
                    return(NotFound());
                }
                else
                {
                    return(Ok(_expenseGroupFactory.CreateExpenseGroup(expenseGroup)));
                }
            }
            catch (Exception)
            {
                return(InternalServerError());
            }
        }
 public ExpenseGroup GetById(int Id)
 {
     return(_repository.GetById(Id));
 }