public static void editTransaction(Transaction transaction) { BasicCreditDbContext db = new BasicCreditDbContext(); db.Entry(transaction).State = EntityState.Modified; db.SaveChanges(); }
public static void editCustomer(Customer customer) { BasicCreditDbContext db = new BasicCreditDbContext(); db.Entry(customer).State = EntityState.Modified; db.SaveChanges(); }
public static void createTransaction(Transaction transaction) { BasicCreditDbContext db = new BasicCreditDbContext(); db.Entry(transaction).State = EntityState.Added; db.Transactions.Add(transaction); db.SaveChanges(); }
public static void deleteTransaction(Transaction transaction) { BasicCreditDbContext db = new BasicCreditDbContext(); db.Entry(transaction).State = EntityState.Deleted; db.Transactions.Remove(transaction); db.SaveChanges(); }
public static void createCustomer(Customer customer) { BasicCreditDbContext db = new BasicCreditDbContext(); db.Entry(customer).State = EntityState.Added; db.Customers.Add(customer); db.SaveChanges(); }
public static void deleteCustomer(Customer customer) { BasicCreditDbContext db = new BasicCreditDbContext(); db.Entry(customer).State = EntityState.Deleted; db.Customers.Remove(customer); db.SaveChanges(); }