示例#1
0
        public T_Shipping updateShipping(T_Shipping item)
        {
            var data = context.T_Shipping.FirstOrDefault(m => m.id == item.id);

            if (data != null)
            {
                context.Entry(data).CurrentValues.SetValues(item);
                context.SaveChanges();
                return(data);
            }
            else
            {
                return(null);
            }
        }
示例#2
0
 public T_Shipping createShippingDoc(T_Shipping shipping)
 {
     context.T_Shipping.Add(shipping);
     context.SaveChanges();
     return(shipping);
 }
示例#3
0
 public T_Shipping addShipping(T_Shipping item)
 {
     context.T_Shipping.Add(item);
     context.SaveChanges();
     return(item);
 }