示例#1
0
        protected DapperRepository(IDbProvider provider, string schemeName = null)
        {
            //string schemeName = null
            _provider = provider;
            if (schemeName == null)
            {
                schemeName = DefaultScheme;
            }

            UpsertMapper             = new UpsertCommandContainer(typeof(TEntity));
            _tableName               = UpsertMapper.ModelName;
            SchemeTableName          = _provider.GetTableName(_tableName, schemeName);
            UpsertSingleItemTemplate = _createUpSertTemplateWhithOutput();
            UpdateSingleItemTemplate = _createUpdateItemByIdTemplate();
        }
示例#2
0
 protected TestBuilderParent(string tableName, string schemeName = null)
 {
     SchemeTableName = CreateSchemeTableName(tableName, schemeName);
     UpsertMapper    = new UpsertCommandContainer(typeof(T));
 }