public int Delete(string roleId) { string commandText = "Delete from AspNetRoles where Id = @id"; Dictionary <string, object> parameters = new Dictionary <string, object>(); parameters.Add("@id", roleId); return(mDB.Execute(commandText, parameters)); }
public int Delete(string userId) { string commandText = "Delete from AspNetUserRoles where UserId = @userId"; Dictionary <string, object> parameters = new Dictionary <string, object>(); parameters.Add("UserId", userId); return(mDB.Execute(commandText, parameters)); }
public int SetPasswordHash(string userId, string passwordHash) { string commandText = "Update AspNetUsers set PasswordHash = @pwdHash where Id = @id"; Dictionary <string, object> parameters = new Dictionary <string, object>(); parameters.Add("@pwdHash", passwordHash); parameters.Add("@id", userId); return(mDB.Execute(commandText, parameters)); }
public int Delete(User user, UserLoginInfo login) { string commandText = "Delete from AspNetUserLogins where UserId = @userId and LoginProvider = @loginProvider and ProviderKey = @providerKey"; Dictionary <string, object> parameters = new Dictionary <string, object>(); parameters.Add("UserId", user.Id); parameters.Add("loginProvider", login.LoginProvider); parameters.Add("providerKey", login.ProviderKey); return(mDB.Execute(commandText, parameters)); }