예제 #1
0
 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");
 }
예제 #2
0
 public TestResultService()
 {
     var context = new StudyItContext();
     this.testResultRepo = new TestResultRepository(context);
     this.testRepo = new TestRepository(context);
 }
예제 #3
0
 public GroupService()
 {
     var context = new StudyItContext();
     this.groupRepo = new GroupRepository(context);
     this.userRepo = new UserRepository(context);
 }