Support Mapper(iit.A,it.Aid) Where ( it.A.Id>1)

This commit is contained in:
skx
2020-12-28 12:58:49 +08:00
parent f878f0774f
commit f44761236c
9 changed files with 302 additions and 8 deletions

View File

@@ -38,6 +38,7 @@ namespace OrmTest
Json();
Ado();
Queryable();
Queryable2();
QueryableAsync();
//Thread();
//Thread2();

View File

@@ -4,9 +4,22 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OrmTest.UnitTest
namespace OrmTest
{
public partial class NewUnitTest
{
public static void Queryable2()
{
var list4 = Db.Queryable<ABMapping>()
.Mapper(it => it.A, it => it.AId)
.Mapper(it => it.B, it => it.BId)
.Where(it=>it.A.Name=="A")
.Where(it=>it.B.Id==1)
.Select(it=>new {
id=it.B.Id
})
.ToList();
}
}
}