Example #1
0
 public DbDataType WithoutSystemType(DbDataType from) => new DbDataType(SystemType, from.DataType, from.DbType, from.Length, from.Precision, from.Scale);
Example #2
0
 public LambdaInfo?Get(DbDataType from, DbDataType to)
 {
     return(_expressions.TryGetValue(from, out var dic) && dic.TryGetValue(to, out var li) ? li : null);
 }
Example #3
0
 public void Set(DbDataType from, DbDataType to, LambdaInfo expr)
 {
     Set(_expressions, from, to, expr);
 }
Example #4
0
        static void Set(ConcurrentDictionary <DbDataType, ConcurrentDictionary <DbDataType, LambdaInfo> > expressions, DbDataType from, DbDataType to, LambdaInfo expr)
        {
            if (!expressions.TryGetValue(from, out var dic))
            {
                expressions[from] = dic = new ConcurrentDictionary <DbDataType, LambdaInfo>();
            }

            dic[to] = expr;
        }
Example #5
0
 public bool Equals(DbDataType other)
 {
     return(SystemType == other.SystemType && DataType == other.DataType && string.Equals(DbType, other.DbType) && Length == other.Length);
 }