Exemplo n.º 1
0
 //Data object --> Entity
 public static Entities.CustomerOrder MapCustomerOrderWithEF(Library.CustomerOrder OCustomerOrder)
 {
     return(new Entities.CustomerOrder
     {
         Amount = OCustomerOrder.Amount,
         Oid = OCustomerOrder.OID,
         Pid = OCustomerOrder.PID
     });
 }
        public void AddCustomerOrder(Library.CustomerOrder customerOrder)
        {
            CustomerOrder Entity = Map.MapCustomerOrderWithEF(customerOrder);

            MyDBContext.Add(Entity);
        }