rename DbContext Internal Method

This commit is contained in:
28810
2020-04-11 12:02:50 +08:00
parent 0154600d0a
commit bd79fc803e
9 changed files with 140 additions and 125 deletions

View File

@ -32,7 +32,7 @@ namespace FreeSql
protected virtual ISelect<TEntity> OrmSelect(object dywhere)
{
DbContextExecCommand(); //查询前先提交,否则会出脏读
DbContextFlushCommand(); //查询前先提交,否则会出脏读
return _db.OrmOriginal.Select<TEntity>().AsType(_entityType).WithTransaction(_uow?.GetOrBeginTransaction(false)).TrackToList(TrackToList).WhereDynamic(dywhere);
}
@ -70,7 +70,7 @@ namespace FreeSql
protected virtual IDelete<TEntity> OrmDelete(object dywhere) => _db.OrmOriginal.Delete<TEntity>().AsType(_entityType).WithTransaction(_uow?.GetOrBeginTransaction()).WhereDynamic(dywhere);
internal void EnqueueToDbContext(DbContext.EntityChangeType changeType, EntityState state) =>
_db.EnqueueAction(changeType, this, typeof(EntityState), _entityType, state);
_db.EnqueuePreCommand(changeType, this, typeof(EntityState), _entityType, state);
internal void IncrAffrows(int affrows) =>
_db._affrows += affrows;