Exemplo n.º 1
0
 private WhereClauseBuilder(WhereClauseBuilder <T> root)
 {
     _dialectSettings = root.DialectSettings;
     _tuples          = new List <KeyValuePair <string, string> >();
     _dynParms        = new DynamicParameters();
     _root            = root;
 }
Exemplo n.º 2
0
 public WhereClauseBuilder(StorageDialectSettings dialectSettings)
 {
     _dialectSettings = dialectSettings ?? throw new ArgumentNullException(nameof(dialectSettings));
     _tuples          = new List <KeyValuePair <string, string> >();
     _dynParms        = new DynamicParameters();
     _root            = null;
 }
Exemplo n.º 3
0
 public static string GetParameterName(this StorageDialectSettings dialectSettings, string name)
 {
     if (dialectSettings == null)
     {
         throw new ArgumentNullException(nameof(dialectSettings));
     }
     return($"{dialectSettings.ParameterPrefix}{name}");
 }
Exemplo n.º 4
0
 public static string GetEscapeName(this StorageDialectSettings dialectSettings, string name)
 {
     if (dialectSettings == null)
     {
         throw new ArgumentNullException(nameof(dialectSettings));
     }
     return($"{dialectSettings.LeadingEscape}{name}{dialectSettings.TailingEscape}");
 }
Exemplo n.º 5
0
 internal SortClauseBuilder(ISortClause obj, IStoreMapping storeMapping, StorageDialectSettings dialectSettings)
 {
     _obj             = obj ?? throw new ArgumentNullException(nameof(obj));
     _storeMapping    = storeMapping ?? throw new ArgumentNullException(nameof(storeMapping));
     _dialectSettings = dialectSettings ?? throw new ArgumentNullException(nameof(dialectSettings));
     _body            = new Dictionary <string, Orderby>();
     //_classMap = ClassMapCached.Fetch<TKey, TEntity>();
     this._classMap = ClassMapCached <TKey, TEntity> .ClassMap;
 }
Exemplo n.º 6
0
        internal WhereClauseBuilder(IWhereClause obj, IStoreMapping storeMapping, StorageDialectSettings dialectSettings)
        {
            _obj             = obj ?? throw new ArgumentNullException(nameof(obj));
            _storeMapping    = storeMapping ?? throw new ArgumentNullException(nameof(storeMapping));
            _dialectSettings = dialectSettings ?? throw new ArgumentNullException(nameof(dialectSettings));
            _builder         = new StringBuilder();
            _parameters      = new Dictionary <string, object>();
            _writeAnd        = () => this.And();
            _writeOr         = () => this.Or();

            //  this._classMap = ClassMapCached.Fetch<TKey, TEntity>();
            this._classMap = ClassMapCached <TKey, TEntity> .ClassMap;
        }
Exemplo n.º 7
0
 public WhereClause(IStoreMapping storeMapping, StorageDialectSettings dialectSettings)
 {
     _storeMapping    = storeMapping ?? throw new ArgumentNullException(nameof(storeMapping));
     _dialectSettings = dialectSettings ?? throw new ArgumentNullException(nameof(dialectSettings));
 }
Exemplo n.º 8
0
 public SqlServerEntityStore(IStoreMapping mapping, StorageDialectSettings dialectSettings) : base(mapping, dialectSettings)
 {
 }
Exemplo n.º 9
0
 public MySqlConstructService(StorageDialectSettings dialectSettings)
 {
     _dialectSettings = dialectSettings ?? throw new ArgumentNullException(nameof(dialectSettings));
 }
Exemplo n.º 10
0
 protected SqlServerEntityStore(IStoreMapping storeMapping, StorageDialectSettings dialectSettings)
     : base(storeMapping, dialectSettings)
 {
 }
Exemplo n.º 11
0
 public static string GetParameterName(this StorageDialectSettings dialectSettings)
 => GetParameterName(dialectSettings, CommonHelper.GetUniqueString());
Exemplo n.º 12
0
 public static string GetParameterName(this StorageDialectSettings dialectSettings, MemberInfo member)
 => GetParameterName(dialectSettings, member.Name);
Exemplo n.º 13
0
 public static string GetEscapeName(this StorageDialectSettings dialectSettings, Type type)
 => GetEscapeName(dialectSettings, type.Name);
Exemplo n.º 14
0
 public static string GetEscapeName <T>(this StorageDialectSettings dialectSettings, Expression <Func <T, object> > member)
 => GetEscapeName(dialectSettings, member.GetMemberName());
 public OrderbyClauseBuilder(StorageDialectSettings dialectSettings)
 {
     _dialectSettings = dialectSettings ?? throw new ArgumentNullException(nameof(dialectSettings));
     _tuples          = new List <KeyValuePair <string, string> >();
 }