mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-09-21 02:42:41 +08:00
- 增加 DbContext、Repository SaveManyToMany 方法,实现手工保存 ManyToMany 关联数据;
This commit is contained in:
@@ -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>
|
||||
|
Reference in New Issue
Block a user