Example #1
0
 public GroupAchievement Group_Achievement_Create(GroupAchievement obj)
 {
     obj.ID = Guid.NewGuid();
     db.GroupAchievements.Add(obj);
     db.SaveChanges();
     obj = db.GroupAchievements.FirstOrDefault(o => o.ID == obj.ID);
     return obj;
 }
Example #2
0
 public GroupAchievement Group_Achievement_Edit(GroupAchievement obj)
 {
     db.Entry(obj).State = EntityState.Modified;
     db.SaveChanges();
     obj = db.GroupAchievements.SingleOrDefault(o => o.ID == obj.ID);
     return obj;
 }
Example #3
0
 public GroupAchievement Classgroup_Delete(GroupAchievement obj)
 {
     GroupAchievement GroupAchievement = db.GroupAchievements.SingleOrDefault(o => o.ID == obj.ID);
     db.GroupAchievements.Remove(GroupAchievement);
     db.SaveChanges();
     return GroupAchievement;
 }