Example #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;
 }
Example #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}");
        }
Example #3
0
 public virtual string GetEscapeColumnName(PropertyInfo propertyInfo, StorageDialectSettings dialectSettings) => this.GetEscapeColumnName(this.GetColumnName(propertyInfo), dialectSettings);
Example #4
0
 public virtual string GetEscapeColumnName <TEntity>(Expression <Func <TEntity, object> > member, StorageDialectSettings dialectSettings) where TEntity : class => this.GetEscapeColumnName(this.GetColumnName <TEntity>(member), dialectSettings);
Example #5
0
 public virtual string GetEscapeTableName(Type type, StorageDialectSettings dialectSettings) => this.GetEscapeTableName(this.GetTableName(type), dialectSettings);
Example #6
0
 public virtual string GetEscapeTableName <TEntity>(StorageDialectSettings dialectSettings) where TEntity : class => this.GetEscapeTableName(this.GetTableName <TEntity>(), dialectSettings);