mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
自动贪婪加载 LeftJoin/InnerJoin/RightJoin 数据
This commit is contained in:
@ -10,17 +10,17 @@ namespace FreeSql.Tests.Sqlite {
|
||||
public class SqliteCodeFirstTest {
|
||||
|
||||
|
||||
class Topic {
|
||||
public class Topic {
|
||||
public Guid Id { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string Content { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
}
|
||||
[Table(Name = "xxxtb.Comment")]
|
||||
class Comment {
|
||||
public class Comment {
|
||||
public Guid Id { get; set; }
|
||||
public Guid TopicId { get; set; }
|
||||
public Topic Topic { get; set; }
|
||||
public virtual Topic Topic { get; set; }
|
||||
public string Nickname { get; set; }
|
||||
public string Content { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
@ -54,6 +54,10 @@ namespace FreeSql.Tests {
|
||||
[Fact]
|
||||
public void Test1() {
|
||||
|
||||
var sql = g.sqlite.Select<TestTypeParentInfo>().Where(a => a.Parent.Parent.Parent.Name == "11").ToSql();
|
||||
var sql222 = g.sqlite.Select<TestTypeParentInfo>().Where(a => a.Parent.Parent.Parent.Name == "11").ToList();
|
||||
|
||||
|
||||
Expression<Func<TestInfo, object>> orderBy = null;
|
||||
orderBy = a => a.CreateTime;
|
||||
var testsql1 = select.OrderBy(orderBy).ToSql();
|
||||
|
Reference in New Issue
Block a user