Beispiel #1
0
        public async Task AddExpense(Guid userId, Expense expense)
        {
            expense.UserId = userId;
            await _context.Expenses.AddAsync(expense);

            await _context.SaveChangesAsync();
        }
Beispiel #2
0
        public async Task AddCategory(Guid userId, Category category)
        {
            category.UserId = userId;

            await _context.Categories.AddAsync(category);

            await _context.SaveChangesAsync();
        }
 public async Task <int> Save()
 {
     return(await _context.SaveChangesAsync());
 }