Esempio n. 1
0
        public static void editTransaction(Transaction transaction)
        {
            BasicCreditDbContext db = new BasicCreditDbContext();

            db.Entry(transaction).State = EntityState.Modified;
            db.SaveChanges();
        }
Esempio n. 2
0
        public static void editCustomer(Customer customer)
        {
            BasicCreditDbContext db = new BasicCreditDbContext();

            db.Entry(customer).State = EntityState.Modified;
            db.SaveChanges();
        }
Esempio n. 3
0
        public static void createTransaction(Transaction transaction)
        {
            BasicCreditDbContext db = new BasicCreditDbContext();

            db.Entry(transaction).State = EntityState.Added;
            db.Transactions.Add(transaction);
            db.SaveChanges();
        }
Esempio n. 4
0
        public static void deleteTransaction(Transaction transaction)
        {
            BasicCreditDbContext db = new BasicCreditDbContext();

            db.Entry(transaction).State = EntityState.Deleted;
            db.Transactions.Remove(transaction);
            db.SaveChanges();
        }
Esempio n. 5
0
        public static void createCustomer(Customer customer)
        {
            BasicCreditDbContext db = new BasicCreditDbContext();

            db.Entry(customer).State = EntityState.Added;
            db.Customers.Add(customer);
            db.SaveChanges();
        }
Esempio n. 6
0
        public static void deleteCustomer(Customer customer)
        {
            BasicCreditDbContext db = new BasicCreditDbContext();

            db.Entry(customer).State = EntityState.Deleted;
            db.Customers.Remove(customer);
            db.SaveChanges();
        }