File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 77using Newtonsoft . Json . Linq ;
88using NpgsqlTypes ;
99using Npgsql . LegacyPostgis ;
10+ using System . Linq . Expressions ;
1011
1112namespace FreeSql . Tests {
1213 public class UnitTest1 {
@@ -53,6 +54,15 @@ class ServiceRequestNew {
5354 [ Fact ]
5455 public void Test1 ( ) {
5556
57+ Expression < Func < TestInfo , object > > orderBy = null ;
58+ orderBy = a => a . CreateTime ;
59+ var testsql1 = select . OrderBy ( orderBy ) . ToSql ( ) ;
60+
61+ orderBy = a => a . Title ;
62+
63+ var testsql2 = select . OrderBy ( orderBy ) . ToSql ( ) ;
64+
65+
5666 var testjson = @"[
5767{
5868""acptNumBelgCityName"":""泰州"",
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ var t5 = fsql.Select<Song>s.OrderBy(a => Guid.NewGuid()).Limit(1).ToList();
9595> dotnet add package FreeSql.Repository
9696
9797``` csharp
98- using (var unitOfWork = fsql .CreateUnitOfWork ()) {
98+ using (var uow = fsql .CreateUnitOfWork ()) {
9999
100100 var songRepository = uow .GetRepository <Song , int >();
101101 var tagRepository = uow .GetRepository <Tag , int >();
You can’t perform that action at this time.
0 commit comments