Example #1
0
        public async Task <int> UpdateUserCourseAsync(UserCourse uc)
        {
            _context.UserCourses.Update(uc);
            int i = await _context.SaveChangesAsync();

            return(i);
        }
Example #2
0
 public void RemoveUserFromCourse(UserCourse uc)
 {
     _context.UserCourses.Remove(uc);
     _context.SaveChanges();
 }
Example #3
0
 public void AddUserToCourse(UserCourse uc)
 {
     _context.UserCourses.Add(uc);
     _context.SaveChanges();
 }