public void MakeSaved(Entity oldEntity) { var entityInfo = CommonModel.Entities.Get(oldEntity.GetType()); this.MakeSavedCore(oldEntity, entityInfo); }
private Entity ForceGetById(Entity entity, IRepository repository) { using (RF.DisableEntityContext()) { var dbEntity = repository.GetById(entity.Id); if (dbEntity == null) { throw new InvalidOperationException(string.Format(@"{1} 类型对应的仓库中不存在 Id 为 {0} 的实体,更新冗余属性失败!", entity.Id, entity.GetType())); } return(dbEntity); } }
public void ClearData(Entity diffEntity) { var entityInfo = CommonModel.Entities.Get(diffEntity.GetType()); this.ClearDataCore(diffEntity, entityInfo); }