コード例 #1
0
        public int DeleteCustomer(Custmers customer)
        {
            Custmers currentCustomer = context.Custmers.Find(customer.Id);

            context.Custmers.Remove(currentCustomer);
            return(1);
        }
コード例 #2
0
 public int UpdateCustomer(Custmers customer)
 {
     context.Entry(customer).State = EntityState.Modified;
     return(1);
 }
コード例 #3
0
 public int InsertCustomer(Custmers customer)
 {
     context.Custmers.Add(customer);
     return(1);
 }