示例#1
0
        private void Initiliaze(DbConnection connection)
        {
            ResourceSqlLoader loader = new ResourceSqlLoader("resources.sql.loader", 
                string.Join(".", new string[] { this.GetType().Namespace, "SqlFiles" }), 
                System.Reflection.Assembly.GetAssembly(this.GetType()));

            dbManager = new Texaco.Database.Petapoco.PetapocoDbManager(null, null);

            dbManager.AddSqlLoader(loader);
            dbManager.ConnectionDescriptor.Add(new ConnectionDescriptor()
            {
                ConnectionString = ((DbConnection)connection).ConnectionString,
                IsDefault = true,
                ProviderName = ((DbConnection)connection).ProviderName,
                Name = "smsgw"
            });

        }
示例#2
0
 public DbCommand(DbConnection connection)
     : base(connection)
 {
     this.Initiliaze(connection);
 }