- 增加 DbContext、Repository SaveManyToMany 方法,实现手工保存 ManyToMany 关联数据;

This commit is contained in:
28810
2019-11-16 01:47:04 +08:00
parent 0f7dd75e64
commit e26dbfe526
8 changed files with 129 additions and 39 deletions

View File

@@ -129,6 +129,12 @@ namespace FreeSql
_db.SaveChanges();
return entity;
}
public void SaveManyToMany(TEntity entity, string propertyName)
{
_dbset.SaveManyToMany(entity, propertyName);
_db.SaveChanges();
}
}
public abstract partial class BaseRepository<TEntity, TKey> : BaseRepository<TEntity>, IBaseRepository<TEntity, TKey>