Beispiel #1
0
 public static IList <PicshareUser> SearchUsers(string userName)
 {
     using (var db = new PicshareIdentityDbContext())
     {
         return(db.Users.Where(u => u.UserName.Contains(userName)).ToList());
     }
 }
Beispiel #2
0
 public static PicshareUser GetUserById(string userId)
 {
     using (var db = new PicshareIdentityDbContext())
     {
         return(db.Users.FirstOrDefault(u => u.Id == userId));
     }
 }