public static void AddUnit(Unit Unit) { using (var context = new ContextApp()) { context.Add(Unit); context.SaveChangesAsync(); } }
public static void AddCurrency(Currency currency) { using (var context = new ContextApp()) { context.Add(currency); context.SaveChangesAsync(); } }
public static void AddCustomer(Customer customer) { using (var context = new ContextApp()) { context.Add(customer); context.SaveChangesAsync(); } }
public static void AddSeller(Seller seller) { using (var context = new ContextApp()) { context.Add(seller); context.SaveChangesAsync(); } }
public static void AddItem(string Name, double Price, double VAT, string UnitName, string UnitCode) { using (var context = new ContextApp()) { context.Add( new Product { Name = Name, Price = Price, VAT = VAT, UnitName = UnitName, UnitCode = UnitCode }); context.SaveChangesAsync(); } }