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

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

            db.Entry(customer).State = EntityState.Modified;
            db.SaveChanges();
        }
Ejemplo 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();
        }
Ejemplo 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();
        }
Ejemplo 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();
        }
Ejemplo 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();
        }