Ejemplo n.º 1
0
 protected DefaultEntityStore(IStoreMapping storeMapping, StorageDialectSettings dialectSettings)
 {
     _storeMapping    = storeMapping ?? throw new ArgumentNullException(nameof(storeMapping));
     _dialectSettings = dialectSettings ?? throw new ArgumentNullException(nameof(dialectSettings));
     //_classMap = ClassMapCached.Fetch<TKey, TEntity>();
     this._classMap = ClassMapCached <TKey, TEntity> .ClassMap;
 }
Ejemplo n.º 2
0
        public virtual string GetEscapeColumnName(string name, StorageDialectSettings dialectSettings)
        {
            if (string.IsNullOrEmpty(name))
            {
                throw new ArgumentNullException(nameof(name));
            }
            if (dialectSettings == null)
            {
                throw new ArgumentNullException(nameof(dialectSettings));
            }

            return($"{dialectSettings.LeadingEscape}{name}{dialectSettings.TailingEscape}");
        }
Ejemplo n.º 3
0
 public virtual string GetEscapeColumnName(PropertyInfo propertyInfo, StorageDialectSettings dialectSettings) => this.GetEscapeColumnName(this.GetColumnName(propertyInfo), dialectSettings);
Ejemplo n.º 4
0
 public virtual string GetEscapeColumnName <TEntity>(Expression <Func <TEntity, object> > member, StorageDialectSettings dialectSettings) where TEntity : class => this.GetEscapeColumnName(this.GetColumnName <TEntity>(member), dialectSettings);
Ejemplo n.º 5
0
 public virtual string GetEscapeTableName(Type type, StorageDialectSettings dialectSettings) => this.GetEscapeTableName(this.GetTableName(type), dialectSettings);
Ejemplo n.º 6
0
 public virtual string GetEscapeTableName <TEntity>(StorageDialectSettings dialectSettings) where TEntity : class => this.GetEscapeTableName(this.GetTableName <TEntity>(), dialectSettings);