Try our conversational search powered by Generative AI!

episerver dds generics returns no value

Vote:
 

Hi

I am using EPIServer 8.12.

I've implemented a class using dds. The problem is when I turn my class to a generic class and I pass the same class if returns no value.

for instance, I have this code which works fine and returns 8 lines:

  var items = store.Items().Where(i => i.State == Enums.QueueItemState.Queued || i.State == Enums.QueueItemState.Retrying).ToList();



(QueueableEmailItem : IDynamicData)

now I change the code to 

var items = store.Items().Where(i => i.State == Enums.QueueItemState.Queued || i.State == Enums.QueueItemState.Retrying).ToList();
and call it with the same class. (where T : IDynamicData)




it returns no results.

Funny story is that if I change the code to code below which fetchs the class before adding the where clause, it will work fine

var items = store.Items().ToList();
var undoneItems = items.Where(i=> i.State == Enums.QueueItemState.Queued || i.State == Enums.QueueItemState.Retrying).ToList();




Is there any problem with generics?
Anyone know what shall I do?

#142655
Dec 17, 2015 16:27
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.