public Course Add(Course courseentity) { using (var db = new TECiDbContext()) { //db.Set<Course>().Add(course); db.Courses.Add(courseentity); db.SaveChanges(); return(courseentity); } }
public void InsertCourse(Course courseentity) { if (courseentity == null) { throw new ArgumentNullException("course"); } _database.Courses.Add(courseentity); _database.SaveChanges(); //event notification //_eventPublisher.EntityInserted(store); }