Esempio n. 1
0
 public static DbGuid DbValue(this SqlServerQueryCommand <Guid?> value)
 {
     return(new DbGuidWrapper(value));
 }
Esempio n. 2
0
 public static DbBool DbValue(this SqlServerQueryCommand <bool?> value)
 {
     return(new DbBoolWrapper(value));
 }
Esempio n. 3
0
 public static DbInt DbValue(this SqlServerQueryCommand <int?> value)
 {
     return(new DbIntWrapper(value));
 }
Esempio n. 4
0
 public static DbDecimal DbValue(this SqlServerQueryCommand <decimal?> value)
 {
     return(new DbDecimalWrapper(value));
 }
Esempio n. 5
0
 public static DbDateTime DbValue(this SqlServerQueryCommand <DateTime?> value)
 {
     return(new DbDateTimeWrapper(value));
 }
Esempio n. 6
0
 public static DbString DbValue(this SqlServerQueryCommand <string> value)
 {
     return(new DbStringWrapper(value));
 }
Esempio n. 7
0
 public static DbEnum <T> DbValue <T>(this SqlServerQueryCommand <T> value)
     where T : struct, Enum
 {
     return(new DbEnumWrapper <T>(value));
 }
Esempio n. 8
0
 public static DbByteArray DbValue(this SqlServerQueryCommand <byte[]> value)
 {
     return(new DbByteArrayWrapper(value));
 }
        public static IWrapper <SqlServerInsertCommand <TColumns> > Insert <TColumns>(this RoscoeDb db, Table table, TColumns expression, SqlServerQueryCommand <TColumns> values)
        {
            Check.IsNotNull(db, nameof(db));
            Check.IsNotNull(table, nameof(table));
            Check.IsNotNull(expression, nameof(expression));

            return(db.ServiceProvider.GetRequiredService <ISqlServerInsertCommandFactory>()
                   .Create(db.ServiceProvider, table, expression, values));
        }
Esempio n. 10
0
 public static DbBool Coalesce(this DbFunctions dbFunctions, SqlServerQueryCommand <DbBool> value, params IDbFragment[] other)
 {
     return(new DbBoolFunctionValue("coalesce", new[] { value }.Concat(other)));
 }
Esempio n. 11
0
 public static DbBool In <T>(this DbFunctions dbFunctions, IDbFragment <T> value, SqlServerQueryCommand <T> query)
 {
     return(new DbBoolBinaryOperator(value, "in", query));
 }
Esempio n. 12
0
 public static DbBool Exists(this DbFunctions dbFunctions, SqlServerQueryCommand query)
 {
     return(new DbBoolFunctionValue("exists ", new[] { query }));
 }
Esempio n. 13
0
 public static DbString JsonQuery(this DbFunctions dbFunctions, SqlServerQueryCommand query)
 {
     return(new DbStringFunctionValue("json_query", new[] { query }));
 }