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