public void GetSource() { var Temp = new Utilities.ORM.Manager.SourceProvider.Manager(Utilities.IoC.Manager.Bootstrapper.ResolveAll<IDatabase>()); ISourceInfo Source = Temp.GetSource("Temp"); Assert.Equal("Temp", Source.Connection); Assert.Equal("Temp", Source.Name); Assert.Equal("@", Source.ParameterPrefix); Assert.Equal(true, Source.Readable); Assert.Equal("System.Data.SqlClient", Source.SourceType); Assert.Equal(true, Source.Writable); }
public void GetSource() { var Temp = new Utilities.ORM.Manager.SourceProvider.Manager(Utilities.IoC.Manager.Bootstrapper.ResolveAll <IDatabase>()); var Source = Temp.GetSource("Temp"); Assert.Equal("Temp", Source.Connection); Assert.Equal("Temp", Source.Name); Assert.Equal("@", Source.ParameterPrefix); Assert.Equal(true, Source.Readable); Assert.Equal("System.Data.SqlClient", Source.SourceType); Assert.Equal(true, Source.Writable); }
protected DatabaseBaseClass() : base() { DatabaseSource = new Utilities.ORM.Manager.SourceProvider.Manager(new List<IDatabase>()).GetSource("Data Source=localhost;Integrated Security=SSPI;Pooling=false"); LDAPSource = new Utilities.ORM.Manager.SourceProvider.Manager(Utilities.IoC.Manager.Bootstrapper.ResolveAll<IDatabase>()).GetSource("LDAP"); MasterDatabaseSource = new Utilities.ORM.Manager.SourceProvider.Manager(new List<IDatabase>()).GetSource("Data Source=localhost;Initial Catalog=master;Integrated Security=SSPI;Pooling=false"); TestDatabaseSource = new Utilities.ORM.Manager.SourceProvider.Manager(Utilities.IoC.Manager.Bootstrapper.ResolveAll<IDatabase>()).GetSource("Data Source=localhost;Initial Catalog=TestDatabase;Integrated Security=SSPI;Pooling=false"); var Temp = new Utilities.ORM.Manager.QueryProvider.Default.DatabaseBatch(DatabaseSource); try { Temp.AddCommand(null, null, CommandType.Text, "Create Database TestDatabase") .Execute(); Temp = new Utilities.ORM.Manager.QueryProvider.Default.DatabaseBatch(TestDatabaseSource); Temp.AddCommand(null, null, CommandType.Text, "Create Table TestTable(ID INT PRIMARY KEY IDENTITY,StringValue1 NVARCHAR(100),StringValue2 NVARCHAR(MAX),BigIntValue BIGINT,BitValue BIT,DecimalValue DECIMAL(12,6),FloatValue FLOAT,DateTimeValue DATETIME,GUIDValue UNIQUEIDENTIFIER)") .Execute(); } catch { } }
protected DatabaseBaseClass() { DatabaseSource = new Utilities.ORM.Manager.SourceProvider.Manager(new List <IDatabase>()).GetSource("Data Source=localhost;Integrated Security=SSPI;Pooling=false"); LDAPSource = new Utilities.ORM.Manager.SourceProvider.Manager(Utilities.IoC.Manager.Bootstrapper.ResolveAll <IDatabase>()).GetSource("LDAP"); MasterDatabaseSource = new Utilities.ORM.Manager.SourceProvider.Manager(new List <IDatabase>()).GetSource("Data Source=localhost;Initial Catalog=master;Integrated Security=SSPI;Pooling=false"); TestDatabaseSource = new Utilities.ORM.Manager.SourceProvider.Manager(Utilities.IoC.Manager.Bootstrapper.ResolveAll <IDatabase>()).GetSource("Data Source=localhost;Initial Catalog=TestDatabase;Integrated Security=SSPI;Pooling=false"); var Temp = new Utilities.ORM.Manager.QueryProvider.Default.DatabaseBatch(DatabaseSource); try { Temp.AddCommand(null, null, CommandType.Text, "Create Database TestDatabase") .Execute(); Temp = new Utilities.ORM.Manager.QueryProvider.Default.DatabaseBatch(TestDatabaseSource); Temp.AddCommand(null, null, CommandType.Text, "Create Table TestTable(ID INT PRIMARY KEY IDENTITY,StringValue1 NVARCHAR(100),StringValue2 NVARCHAR(MAX),BigIntValue BIGINT,BitValue BIT,DecimalValue DECIMAL(12,6),FloatValue FLOAT,DateTimeValue DATETIME,GUIDValue UNIQUEIDENTIFIER)") .Execute(); } catch { } }
public void Create() { var Temp = new Utilities.ORM.Manager.SourceProvider.Manager(Utilities.IoC.Manager.Bootstrapper.ResolveAll<IDatabase>()); Assert.NotNull(Temp); }
public void Create() { var Temp = new Utilities.ORM.Manager.SourceProvider.Manager(Utilities.IoC.Manager.Bootstrapper.ResolveAll <IDatabase>()); Assert.NotNull(Temp); }