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