コード例 #1
0
ファイル: CustomerService.cs プロジェクト: cuongpv88/work
 /// <summary>
 /// Insert Line
 /// </summary>
 /// <param name="customer"></param>
 public void Insert(Customer customer)
 {
     if (customer != null)
     {
         _context.Customers.AddObject(customer);
         SaveChanges();
     }
 }
コード例 #2
0
 /// <summary>
 /// Create a new Customer object.
 /// </summary>
 /// <param name="cusID">Initial value of the CusID property.</param>
 /// <param name="cusCode">Initial value of the CusCode property.</param>
 /// <param name="cusName">Initial value of the CusName property.</param>
 public static Customer CreateCustomer(global::System.Int32 cusID, global::System.String cusCode, global::System.String cusName)
 {
     Customer customer = new Customer();
     customer.CusID = cusID;
     customer.CusCode = cusCode;
     customer.CusName = cusName;
     return customer;
 }
コード例 #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Customers EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToCustomers(Customer customer)
 {
     base.AddObject("Customers", customer);
 }