public string GetUserName(string userId) { string commandText = "Select Name from AspNetUsers where Id = @id"; Dictionary <string, object> parameters = new Dictionary <string, object>() { { "@id", userId } }; return(mDB.QueryString(commandText, parameters)); }
public string GetRoleName(string roleId) { string commandText = "Select Name from AspNetRoles where Id = @id"; Dictionary <string, object> parameters = new Dictionary <string, object>(); parameters.Add("@id", roleId); return(mDB.QueryString(commandText, parameters)); }
public string FindUserIdByLogin(UserLoginInfo userLogin) { string commandText = "Select UserId from AspNetUserLogins where LoginProvider = @loginProvider and ProviderKey = @providerKey"; Dictionary <string, object> parameters = new Dictionary <string, object>(); parameters.Add("loginProvider", userLogin.LoginProvider); parameters.Add("providerKey", userLogin.ProviderKey); return(mDB.QueryString(commandText, parameters)); }