public void updateSubject(string id, subject sub) { subject dbsub = database.subjects.First(data => data.idsubjects == id); dbsub = sub; database.SaveChanges(); }
public void deleteSubject(string id) { subject sub = database.subjects.First(data => data.idsubjects == id); database.subjects.Remove(sub); }
public subject getSubject(string id) { subject sub = database.subjects.First(data => data.idsubjects == id); return(sub); }
public void insertSubject(ref subject sub) { database.subjects.Add(sub); database.SaveChanges(); }