diff --git a/Bootstrap.Client.DataAccess/BAHelper.cs b/Bootstrap.Client.DataAccess/BAHelper.cs deleted file mode 100644 index 8e670471..00000000 --- a/Bootstrap.Client.DataAccess/BAHelper.cs +++ /dev/null @@ -1,50 +0,0 @@ -using Bootstrap.Security; -using Longbow; -using Longbow.Configuration; -using System; -using System.Collections.Generic; -using System.Net.Http; - -namespace Bootstrap.Client.DataAccess -{ - internal static class BAHelper - { - private readonly static LgbHttpClient _client = new LgbHttpClient(new HttpClient() { BaseAddress = new Uri($"{ConfigurationManager.AppSettings["AuthHost"]}/api/Interface/") }); - - private static T ExecuteRemoteAction(string actionName, object data = null) - { - var task = _client.PostAsJsonAsync(actionName, data); - task.Wait(); - return task.Result; - } - /// - /// - /// - /// - /// - public static IEnumerable RetrieveAppMenus(object args) => ExecuteRemoteAction>("RetrieveAppMenus", args); - /// - /// - /// - /// - /// - public static IEnumerable RetrieveRolesByUrl(string url) => ExecuteRemoteAction>("RetrieveRolesByUrl", url); - /// - /// - /// - /// - /// - public static IEnumerable RetrieveRolesByUserName(string userName) => ExecuteRemoteAction>("RetrieveRolesByUserName", userName); - /// - /// - /// - /// - public static IEnumerable RetrieveDicts() => ExecuteRemoteAction>("RetrieveDicts"); - /// - /// - /// - /// - /// - public static BootstrapUser RetrieveUserByUserName(string userName) => ExecuteRemoteAction("RetrieveUserByUserName", userName); - } -} diff --git a/Bootstrap.Client.DataAccess/RoleHelper.cs b/Bootstrap.Client.DataAccess/RoleHelper.cs index 852a14ed..e9246f84 100644 --- a/Bootstrap.Client.DataAccess/RoleHelper.cs +++ b/Bootstrap.Client.DataAccess/RoleHelper.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using Bootstrap.Security; +using System.Collections.Generic; namespace Bootstrap.Client.DataAccess {