Exemplo n.º 1
0
 public StudentAchievement Student_Achievement_Delete(StudentAchievement obj)
 {
     StudentAchievement StudentAchievement = db.StudentAchievements.SingleOrDefault(o => o.ID == obj.ID);
     db.StudentAchievements.Remove(StudentAchievement);
     db.SaveChanges();
     return StudentAchievement;
 }
Exemplo n.º 2
0
 public StudentAchievement Student_Achievement_Edit(StudentAchievement obj)
 {
     db.Entry(obj).State = EntityState.Modified;
     db.SaveChanges();
     obj = db.StudentAchievements.SingleOrDefault(o => o.ID == obj.ID);
     return obj;
 }
Exemplo n.º 3
0
 public StudentAchievement Student_Achievement_Create(StudentAchievement obj)
 {
     obj.ID = Guid.NewGuid();
     db.StudentAchievements.Add(obj);
     db.SaveChanges();
     obj = db.StudentAchievements.FirstOrDefault(o => o.ID == obj.ID);
     return obj;
 }