| | |
| | | .WhereIF(whereExpression != null, whereExpression).ToListAsync(); |
| | | } |
| | | |
| | | public bool DeleteAndMoveIntoHty(TEntity entity, OperateType operateType) |
| | | public bool DeleteAndMoveIntoHty(TEntity entity, OperateTypeEnum operateType) |
| | | { |
| | | Type type = entity.GetType(); |
| | | Assembly assembly = type.Assembly; |
| | |
| | | { |
| | | object? obj = Activator.CreateInstance(htyType); |
| | | PropertyInfo keyPro = typeof(TEntity).GetKeyProperty(); |
| | | PropertyInfo? operateTypePro = htyType.GetProperty(nameof(OperateType)); |
| | | PropertyInfo? operateTypePro = htyType.GetProperty(nameof(OperateTypeEnum)); |
| | | PropertyInfo? sourceIdPro = htyType.GetProperty("SourceId"); |
| | | if (obj != null && keyPro != null && operateTypePro != null && sourceIdPro != null) |
| | | { |
| | |
| | | return DeleteData(entity); |
| | | } |
| | | |
| | | public bool DeleteAndMoveIntoHty(List<TEntity> entities, OperateType operateType) |
| | | public bool DeleteAndMoveIntoHty(List<TEntity> entities, OperateTypeEnum operateType) |
| | | { |
| | | Type type = typeof(TEntity); |
| | | Assembly assembly = type.Assembly; |
| | |
| | | { |
| | | object? obj2 = Activator.CreateInstance(htyType); |
| | | PropertyInfo keyPro = typeof(TEntity).GetKeyProperty(); |
| | | PropertyInfo? operateTypePro = htyType.GetProperty(nameof(OperateType)); |
| | | PropertyInfo? operateTypePro = htyType.GetProperty(nameof(OperateTypeEnum)); |
| | | PropertyInfo? sourceIdPro = htyType.GetProperty("SourceId"); |
| | | if (obj2 != null && keyPro != null && operateTypePro != null && sourceIdPro != null) |
| | | { |