Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
        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));
        }