public ExpenseIncome Create(ExpenseIncome expenseIncome) { if (expenseIncome.ExpenseOrIncome.ToString() != "Expense" && expenseIncome.ExpenseOrIncome.ToString() != "Income" && expenseIncome.ExpenseOrIncome.ToString() != "Transfer") { return(null); } expenseIncome.TransferToAccountId = 0; _context.Add(expenseIncome); _context.SaveChanges(); return(expenseIncome); }
public Category Create(Category category) { _context.Add(category); _context.SaveChanges(); return(category); }
public ShoppingCart Create(ShoppingCart shoppingCart) { _context.Add <ShoppingCart>(shoppingCart); _context.SaveChanges(); return(shoppingCart); }
public Account Create(Account account) { _context.Add(account); _context.SaveChanges(); return(account); }
public Item Create(Item item) { _context.Add <Item>(item); _context.SaveChanges(); return(item); }