コード例 #1
0
ファイル: DbEditor.cs プロジェクト: nopills/Business-Helper
 public static void AddUnit(Unit Unit)
 {
     using (var context = new ContextApp())
     {
         context.Add(Unit);
         context.SaveChangesAsync();
     }
 }
コード例 #2
0
ファイル: DbEditor.cs プロジェクト: nopills/Business-Helper
 public static void AddCurrency(Currency currency)
 {
     using (var context = new ContextApp())
     {
         context.Add(currency);
         context.SaveChangesAsync();
     }
 }
コード例 #3
0
ファイル: DbEditor.cs プロジェクト: nopills/Business-Helper
 public static void AddCustomer(Customer customer)
 {
     using (var context = new ContextApp())
     {
         context.Add(customer);
         context.SaveChangesAsync();
     }
 }
コード例 #4
0
ファイル: DbEditor.cs プロジェクト: nopills/Business-Helper
 public static void AddSeller(Seller seller)
 {
     using (var context = new ContextApp())
     {
         context.Add(seller);
         context.SaveChangesAsync();
     }
 }
コード例 #5
0
ファイル: DbEditor.cs プロジェクト: nopills/Business-Helper
 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();
     }
 }