mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 10:42:52 +08:00
update
This commit is contained in:
parent
e3c0f615f9
commit
6c64eac419
@ -7,6 +7,7 @@ using System.Linq;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NpgsqlTypes;
|
||||
using Npgsql.LegacyPostgis;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace FreeSql.Tests {
|
||||
public class UnitTest1 {
|
||||
@ -53,6 +54,15 @@ namespace FreeSql.Tests {
|
||||
[Fact]
|
||||
public void Test1() {
|
||||
|
||||
Expression<Func<TestInfo, object>> orderBy = null;
|
||||
orderBy = a => a.CreateTime;
|
||||
var testsql1 = select.OrderBy(orderBy).ToSql();
|
||||
|
||||
orderBy = a => a.Title;
|
||||
|
||||
var testsql2 = select.OrderBy(orderBy).ToSql();
|
||||
|
||||
|
||||
var testjson = @"[
|
||||
{
|
||||
""acptNumBelgCityName"":""泰州"",
|
||||
|
@ -95,7 +95,7 @@ var t5 = fsql.Select<Song>s.OrderBy(a => Guid.NewGuid()).Limit(1).ToList();
|
||||
> dotnet add package FreeSql.Repository
|
||||
|
||||
```csharp
|
||||
using (var unitOfWork = fsql.CreateUnitOfWork()) {
|
||||
using (var uow = fsql.CreateUnitOfWork()) {
|
||||
|
||||
var songRepository = uow.GetRepository<Song, int>();
|
||||
var tagRepository = uow.GetRepository<Tag, int>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user