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