public SiteBinding GetSiteBinding(int id) { using (SqlConnection conn = DataVault.GetOpenConnection()) { return(conn.Query("SELECT * FROM IISSiteBinding WHERE Id=@id", new { id }).SingleOrDefault()); } }
public IEnumerable <SiteWebConfiguration> PostSiteWebConfiguration(IEnumerable <SiteWebConfiguration> siteWebConfigurations) { siteWebConfigurations = siteWebConfigurations.GroupBy(x => x.Id).Select(x => x.FirstOrDefault()); return(DataVault .Post(DapperMethod.CoreServices.PostSiteWebConfigMultiple, siteWebConfigurations)); }
public IEnumerable <SitePackage> PostPackageInformation(IEnumerable <SitePackage> sitePackage) { sitePackage = sitePackage .GroupBy(x => new { x.SiteId, x.Name }) .Select(x => x.FirstOrDefault()); return(DataVault .Post(DapperMethod.CoreServices.PostSitePackVersionMultiple, sitePackage)); }
public IEnumerable <SiteEndpoint> PostSiteEndpoint(IEnumerable <SiteEndpoint> siteEndpoint) { siteEndpoint = siteEndpoint .GroupBy(x => new { x.SiteId, x.EndpointUrl, x.EndpointName }) .Select(x => x.FirstOrDefault()); return(DataVault .Post(DapperMethod.TrackingServices.PostSiteEndpointMultiple, siteEndpoint)); }
public BaseRepository(string dbConnectionString) { vault = new DataVault(dbConnectionString); string className = typeof(Class).Name; _consoleTitle = $"[DB - ENGINE]({className})-> "; XConsole.SetDefaultColorSet(DatabaseEngine.ConsoleColor); XConsole.SetTitle(_consoleTitle); }
public string ObtainApiKey(string username, string password, bool generateKey = true) { if (generateKey) { GenerateApiKey(username, password); } DTIISMNGUser user = DataVault .Get <DTIISMNGUser>(DapperMethod.AuthenticationServices.ObtainApiKey, new { @Username = username, @Password = password }); return(user?.AuthKey); }
public IEnumerable <SiteConnectionString> PostSiteConnectionString(IEnumerable <SiteConnectionString> siteConnectionString) { siteConnectionString = siteConnectionString .GroupBy(x => new { x.SiteId, x.ServerName, x.DatabaseName, x.ConnectionName }) .Select(x => x.FirstOrDefault()); //List<SiteConnectionString> strings = siteConnectionString.ToList(); //var q = from x in strings // group x by new { x.SiteId, x.ServerName, x.DatabaseName, x.ConnectionName } into g // let count = g.Count() // orderby count descending // select new { Value = g.Key, Count = count }; return(DataVault .Post(DapperMethod.TrackingServices.PostSiteConnectionStringMultiple, siteConnectionString)); }
public dynamic SignWithApiKey(string apiKey) { if (apiKey == null) { return(null); } SignedUser user = DataVault .Get <SignedUser>(DapperMethod.AuthenticationServices.SignInWithApiKey, new { @AuthKey = apiKey }); if (user == null) { return(null); } user.AuthKey = apiKey; return(user); }
public IEnumerable <ADDomain> All() { return(DataVault .Get <IEnumerable <ADDomain> >(DapperMethod.PlatformServices.GetActiveDirectoryDomainsAll)); }
public IEnumerable <SiteWebConfiguration> All() { return(DataVault .GetList <SiteWebConfiguration>(DapperMethod.CoreServices.GetSiteWebConfigsAll)); }
public IEnumerable <ISiteTracker> PostSiteTracker(IEnumerable <ISiteTracker> siteTracker) { return(DataVault .Post(DapperMethod.CoreServices.PostSiteTrackerMultiple, siteTracker)); }
public int PostSiteBinding(SiteBinding siteBinding) { return(DataVault .Post(DapperMethod.CoreServices.PostSiteBinding, siteBinding)); }
public IEnumerable <SiteEndpoint> GetEndpointList(int SiteId) { return(DataVault .GetList <SiteEndpoint>(DapperMethod.TrackingServices.GetSiteEndpointsBySiteId, new { @SiteId = SiteId })); }
public int PostSiteEndpoint(SiteEndpoint siteEndpoint) { return(DataVault .Post(DapperMethod.TrackingServices.PostSiteEndpoint, siteEndpoint)); }
public IEnumerable <SiteBinding> PostSiteBinding(IEnumerable <SiteBinding> siteBindings) { return(DataVault .Post(DapperMethod.CoreServices.PostSiteBindingMultiple, siteBindings)); }
public static extern int RegisterDragDrop( IntPtr hWnd, DataVault.UI.Impl.Controls.FileSystem.ShellAPI.Interfaces.IDropTarget IdropTgt);
public ServiceTimer GetScheduler(int clientId, int serviceId) { return(DataVault .Get <ServiceTimer>(DapperMethod.ManagementServices.GetScheduler, new { @clientId = clientId, @serviceId = serviceId })); }
public int SetScheduler(IServiceTimer svcTimer) { return(DataVault .Post(DapperMethod.ManagementServices.PostScheduler, svcTimer)); }
public int SaveClient(IClient client) { return(DataVault .Post(DapperMethod.ManagementServices.PostClient, client)); }
public IEnumerable <Client> All() { return(DataVault .GetList <Client>(DapperMethod.ManagementServices.GetAllClients)); }
public Client GetClient(string machineName) { return(DataVault .Get <Client>(DapperMethod.ManagementServices.GetClientByMachineName, new { @machineName = machineName })); }
public SiteWebConfiguration GetSiteWebConfiguration(int id) { return(DataVault .Get <SiteWebConfiguration>(DapperMethod.CoreServices.GetSiteWebConfigBySiteId, new { @Id = id })); }
public IEnumerable <SiteConnectionString> All() { return(DataVault .GetList <SiteConnectionString>(DapperMethod.TrackingServices.GetSiteConnectionStringsAll)); }
public int PostSiteWebConfiguration(SiteWebConfiguration siteWebConfiguration) { return(DataVault .Post(DapperMethod.CoreServices.PostSiteWebConfig, siteWebConfiguration)); }
public IEnumerable <SiteConnectionString> GetConnectionStringList(int SiteId) { return(DataVault .GetList <SiteConnectionString>(DapperMethod.TrackingServices.GetSiteConnectionStringBySiteId, new { @SiteId = SiteId })); }
public IEnumerable <SiteEndpoint> All() { return(DataVault .GetList <SiteEndpoint>(DapperMethod.TrackingServices.GetSiteEndpointsAll)); }
public SiteConnectionString GetSiteConnectionString(int id) { return(DataVault .Get <SiteConnectionString>(DapperMethod.TrackingServices.GetSiteConnectionStringById, new { @Id = id })); }
public SiteEndpoint GetSiteEndpoint(int Id) { return(DataVault .Get <SiteEndpoint>(DapperMethod.TrackingServices.GetSiteEndpointById, new { @Id = Id })); }
public int PostSiteConnectionString(SiteConnectionString siteConnectionString) { return(DataVault .Post(DapperMethod.TrackingServices.PostSiteConnectionString, siteConnectionString)); }
public int DisableScheduler(int serviceId, int clientId) { return(DataVault .Post(DapperMethod.ManagementServices.DisableScheduler, new { @serviceId = serviceId, @clientId = clientId })); }
public int PostSiteTracker(ISiteTracker siteTracker) { return(DataVault .Post(DapperMethod.CoreServices.PostSiteTracker, siteTracker)); }