Beispiel #1
0
 public UserInfo GetUser(int userId)
 {
     using (SecurityDbContext securityDbContext = new SecurityDbContext())
         return(securityDbContext.Users.Find((object)userId));
 }
Beispiel #2
0
 private List <Operation> GetAllOperations()
 {
     using (SecurityDbContext securityDbContext = new SecurityDbContext())
         return(securityDbContext.Operations.Where <Operation>((Expression <Func <Operation, bool> >)(opr => opr.IsActive && !opr.IsDeleted)).ToList <Operation>());
 }
Beispiel #3
0
 public bool HasAccess(int userId, string operationCode)
 {
     using (SecurityDbContext securityDbContext = new SecurityDbContext())
         return(securityDbContext.CheckSecurityAccess(userId, operationCode));
 }