コード例 #1
0
 public static AspNetUser GetUserDetails(string userName,int userId)
 {
     using (TestDatabaseEntities dbContext = new TestDatabaseEntities())
     {
         AspNetUser user = dbContext.AspNetUsers.FirstOrDefault(m => m.UserName == userName && m.NumericUserId == userId);
         return user;
     }
 }
コード例 #2
0
 public static  AspNetUser GetUserByUserName(string userName)
 {
     using (TestDatabaseEntities dbContext = new TestDatabaseEntities())
     {
         AspNetUser user = dbContext.AspNetUsers.FirstOrDefault(m => m.UserName == userName);
         return user;
     }
 }