예제 #1
0
 //Create
 public AppUser Insert(AppUser appuser)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         ctx.AppUser.Add(appuser);
         ctx.SaveChanges();
         return this;
     }
 }
예제 #2
0
 //Update
 public AppUser Update(AppUser appuser)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         AppUser AppUser = ctx.AppUser.First(x => x.AppUserID == this.AppUserID);
         AppUser = appuser;
         ctx.SaveChanges();
         return AppUser;
     }
 }
 public AppUser Put(AppUser appuser)
 {
     return new AppUser().Insert(appuser);
 }
 public AppUser Post(AppUser appuser)
 {
     return new AppUser().Update(appuser);
 }