@@ -223,6 +223,19 @@ protected override IRepositoryCachePolicy<IDictionaryItem, Guid> CreateCachePoli
223
223
return new SingleItemsOnlyRepositoryCachePolicy < IDictionaryItem , Guid > ( GlobalIsolatedCache , ScopeAccessor ,
224
224
options ) ;
225
225
}
226
+
227
+ protected override IEnumerable < IDictionaryItem > PerformGetAll ( params Guid [ ] ? ids )
228
+ {
229
+ Sql < ISqlContext > sql = GetBaseQuery ( false ) . Where < DictionaryDto > ( x => x . PrimaryKey > 0 ) ;
230
+ if ( ids ? . Any ( ) ?? false )
231
+ {
232
+ sql . WhereIn < DictionaryDto > ( x => x . UniqueId , ids ) ;
233
+ }
234
+
235
+ return Database
236
+ . FetchOneToMany < DictionaryDto > ( x => x . LanguageTextDtos , sql )
237
+ . Select ( ConvertToEntity ) ;
238
+ }
226
239
}
227
240
228
241
private class DictionaryByKeyRepository : SimpleGetRepository < string , IDictionaryItem , DictionaryDto >
@@ -266,6 +279,19 @@ protected override IRepositoryCachePolicy<IDictionaryItem, string> CreateCachePo
266
279
return new SingleItemsOnlyRepositoryCachePolicy < IDictionaryItem , string > ( GlobalIsolatedCache , ScopeAccessor ,
267
280
options ) ;
268
281
}
282
+
283
+ protected override IEnumerable < IDictionaryItem > PerformGetAll ( params string [ ] ? ids )
284
+ {
285
+ Sql < ISqlContext > sql = GetBaseQuery ( false ) . Where < DictionaryDto > ( x => x . PrimaryKey > 0 ) ;
286
+ if ( ids ? . Any ( ) ?? false )
287
+ {
288
+ sql . WhereIn < DictionaryDto > ( x => x . Key , ids ) ;
289
+ }
290
+
291
+ return Database
292
+ . FetchOneToMany < DictionaryDto > ( x => x . LanguageTextDtos , sql )
293
+ . Select ( ConvertToEntity ) ;
294
+ }
269
295
}
270
296
271
297
protected override IEnumerable < IDictionaryItem > PerformGetAll ( params int [ ] ? ids )
0 commit comments