Beispiel #1
0
 public User GetUser(int id)
 {
     if (id == user.Id || IsSiteAdmin)
     {
         return(db.SelectObjectById <User> (id));
     }
     else
     {
         throw new InvalidOperationException("Not authorized");
     }
 }
Beispiel #2
0
 public Application GetApplication(int id)
 {
     return(db.SelectObjectById <Application> (id));
 }