- 增加 DbContext/Repository ManyToMany联级保存功能(之前已支持OneToMany);

This commit is contained in:
28810
2019-09-29 15:02:08 +08:00
parent 7514000490
commit 33cb3e2dae
11 changed files with 435 additions and 58 deletions

View File

@ -59,6 +59,7 @@ namespace FreeSql
}
public Type EntityType => _dbsetPriv?.EntityType ?? typeof(TEntity);
public void AsType(Type entityType) => _dbset.AsType(entityType);
public DbContextOptions DbContextOptions { get => _db.Options; set => _db.Options = value; }
public IFreeSql Orm { get; private set; }
public IUnitOfWork UnitOfWork { get; set; }

View File

@ -17,6 +17,11 @@ namespace FreeSql
/// <param name="entityType"></param>
/// <returns></returns>
void AsType(Type entityType);
/// <summary>
/// 设置 DbContext 选项
/// </summary>
DbContextOptions DbContextOptions { get; set; }
}
public interface IBaseRepository<TEntity> : IReadOnlyRepository<TEntity>, IBasicRepository<TEntity>