public ActionResult Delete(int id) { StudyIt.Models.UserProfile user; using (var db = new StudyItContext()) { user = db.UserProfiles.First(x => x.UserId == id); } Roles.RemoveUserFromRole(user.UserName, "GroupAdmin"); return Redirect("/admin/groupadmins/show"); }
public TestResultService() { var context = new StudyItContext(); this.testResultRepo = new TestResultRepository(context); this.testRepo = new TestRepository(context); }
public GroupService() { var context = new StudyItContext(); this.groupRepo = new GroupRepository(context); this.userRepo = new UserRepository(context); }