T3M4CH
Get concrete generic type by Enum
Hello. Can someone explain how I can solve my problem. I have interface IContainerService<T>
and Entity from Database with Type(Box, Pallet, BigBox etc.) and T(ProductCategory : Food, Animals, Clothes)
And here's problem when I get my Container from DB Idk how to get concrete type and execute AddProduct method
I've tried something like this but with no results cause IContainerBase doesn't contains AddProduct just general method.
How can I get concrete type based by information from Enums? I want to get like method CreateContainer but with concreteType where I can call AddProduct and GetProduct method
2 replies