public void Delete(int id) { User u = context.Users.SingleOrDefault(x => x.UserId == id); context.Users.Remove(u); context.SaveChanges(); }
public void Delete(int id) { TransactionDetail detail = context.TransactionDetails.SingleOrDefault(x => x.Id == id); context.TransactionDetails.Remove(detail); context.SaveChanges(); }
public void Delete(int id) { Transaction t = context.Transactions.SingleOrDefault(x => x.Id == id); context.Transactions.Remove(t); context.SaveChanges(); }
public void Delete(int id) { AccountType accType = context.AccountTypes.SingleOrDefault(x => x.Id == id); context.AccountTypes.Remove(accType); context.SaveChanges(); }
public void Delete(int id) { IncomeStatement state = context.IncomeStatements.SingleOrDefault(x => x.Id == id); context.IncomeStatements.Remove(state); context.SaveChanges(); }
public void Delete(int id) { Ledger ledger = context.Ledgers.SingleOrDefault(x => x.Id == id); context.Ledgers.Remove(ledger); context.SaveChanges(); }
public bool Delete(int id) { Voucher c = Context.Vouchers.SingleOrDefault(x => x.Id == id); Context.Vouchers.Remove(c); Context.SaveChanges(); return(true); }
public bool Delete(int id) { Journal c = Context.Journals.SingleOrDefault(x => x.Id == id); Context.Journals.Remove(c); Context.SaveChanges(); return(true); }
public ActionResult Create([Bind(Include = "Id,Type")] UserType userType) { if (ModelState.IsValid) { db.UserTypes.Add(userType); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(userType)); }
public void Insert(TransactionType tType) { context.TransactionTypes.Add(tType); context.SaveChanges(); }
public Company Insert(Company company) { context.Companies.Add(company); context.SaveChanges(); return(context.Companies.SingleOrDefault(x => x.CompanyName == company.CompanyName)); }
public void Insert(Company company) { context.Companies.Add(company); context.SaveChanges(); }