Skip to content

Commit 6c64eac

Browse files
2881028810
authored andcommitted
update
1 parent e3c0f61 commit 6c64eac

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

FreeSql.Tests/UnitTest1.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Newtonsoft.Json.Linq;
88
using NpgsqlTypes;
99
using Npgsql.LegacyPostgis;
10+
using System.Linq.Expressions;
1011

1112
namespace 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"":""泰州"",

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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>();

0 commit comments

Comments
 (0)