I use entity framework with DbContext T4 code generator. The code generated includes entity objects with child entity collections. They are declared as ICollection<T>. Now, I found out at runtime they actually become HashSet<T>. How .NET handles such cases? Can someone point me to the documentation where I can find information on default implementation types of specific interface?
I use entity framework with DbContext T4 code generator. The code generated includes entity
Share
There is no “default implementation” for an interface. If a method returns an interface, that method decides which type is actually returned. In your case, that’s most likely something inside Entity Framework.