AggregateRootRepository Boundary

This commit is contained in:
2881099
2022-09-04 23:06:44 +08:00
parent 5d12e1c436
commit 9db121d531
7 changed files with 291 additions and 185 deletions

View File

@ -26,7 +26,7 @@ namespace FreeSql.Tests.DbContext2
{
new UserRepository(fsql, null);
var code = AggregateRootUtils.GetAutoIncludeQueryStaicCode(fsql, typeof(User));
var code = AggregateRootUtils.GetAutoIncludeQueryStaicCode(null, fsql, typeof(User));
Assert.Equal(@"//fsql.Select<User>()
SelectDiy
.Include(a => a.Ext)", code);
@ -147,7 +147,6 @@ SelectDiy
public int Id { get; set; }
public string UserName { get; set; }
public string Password { get; set; }
[Navigate(nameof(Id))]
public UserExt Ext { get; set; }
}
class UserExt
@ -155,7 +154,6 @@ SelectDiy
[Column(IsPrimary = true)]
public int UserId { get; set; }
public string Remark { get; set; }
[Navigate(nameof(UserId))]
public User Org { get; set; }
}
}