mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Update demo
This commit is contained in:
parent
b519201e4a
commit
18e37307b3
@ -132,7 +132,8 @@ namespace OrmTest
|
|||||||
datetime=it.CreateTime
|
datetime=it.CreateTime
|
||||||
})
|
})
|
||||||
.ToList();
|
.ToList();
|
||||||
|
var list3 = db.Queryable<Order>().Where(it => it.CreateTime.Date == SqlFunc.Oracle_ToDate("2021-1-21", "yyyy-MM-dd")).ToList();
|
||||||
|
var list4 = db.Queryable<Order>().Select(it => SqlFunc.Oracle_ToChar(DateTime.Now, "yyyy-MM-dd")).ToList();
|
||||||
Console.WriteLine("#### SqlFunc End ####");
|
Console.WriteLine("#### SqlFunc End ####");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,6 +130,8 @@ namespace OrmTest
|
|||||||
.Any()
|
.Any()
|
||||||
).ToList();
|
).ToList();
|
||||||
|
|
||||||
|
var list3=db.Queryable<Order>().Select(it => SqlFunc.SqlServer_DateDiff("day", DateTime.Now.AddDays(-1), DateTime.Now)).ToList();
|
||||||
|
|
||||||
Console.WriteLine("#### Subquery End ####");
|
Console.WriteLine("#### Subquery End ####");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,8 +140,8 @@ namespace SqlSugar
|
|||||||
public static int CharIndex(string findChar,string searchValue) { throw new NotSupportedException("Can only be used in expressions"); }
|
public static int CharIndex(string findChar,string searchValue) { throw new NotSupportedException("Can only be used in expressions"); }
|
||||||
public static int BitwiseAnd(int left, int right) { throw new NotSupportedException("Can only be used in expressions"); }
|
public static int BitwiseAnd(int left, int right) { throw new NotSupportedException("Can only be used in expressions"); }
|
||||||
public static int BitwiseInclusiveOR(int left, int right) { throw new NotSupportedException("Can only be used in expressions"); }
|
public static int BitwiseInclusiveOR(int left, int right) { throw new NotSupportedException("Can only be used in expressions"); }
|
||||||
public static DateTime Oracle_ToDate(object date,string format) { throw new NotSupportedException("Can only be used in expressions"); }
|
public static DateTime Oracle_ToDate(string date,string format) { throw new NotSupportedException("Can only be used in expressions"); }
|
||||||
public static string Oracle_ToChar(object date, string format) { throw new NotSupportedException("Can only be used in expressions"); }
|
public static string Oracle_ToChar(DateTime date, string format) { throw new NotSupportedException("Can only be used in expressions"); }
|
||||||
public static int SqlServer_DateDiff(string dateType,DateTime date1,DateTime date2) { throw new NotSupportedException("Can only be used in expressions"); }
|
public static int SqlServer_DateDiff(string dateType,DateTime date1,DateTime date2) { throw new NotSupportedException("Can only be used in expressions"); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user