예제 #1
0
 public void InsertOrUpdate(tGroup user)
 {
     if (user.IDGroup == default(int)) {
         // New entity
         context.tGroups.InsertOnSubmit(user);
     } else {
         // Existing entity
         tGroup userToUpdate = Find(user.IDGroup);
         if (userToUpdate != null && userToUpdate.IDGroup > 0) {
             userToUpdate.Name = user.Name;
             userToUpdate.IDGroup = user.IDGroup;
         }
     }
     context.SubmitChanges();
 }
예제 #2
0
 partial void DeletetGroup(tGroup instance);
예제 #3
0
 partial void UpdatetGroup(tGroup instance);
예제 #4
0
 partial void InserttGroup(tGroup instance);