public async Task <int> NewExpensesAsync(Domain.Expense expense) { var result = -1; try { _expContext.Add(expense); result = await _expContext.SaveChangesAsync(); if (result < 1) { throw new Exception("Error occurred while adding new expense into database"); } result = expense.Id; } catch (Exception) { throw; } return(result); }