FAQ Database Discussion Community

Converting IEnumerable to Dictionary

after adding bool distinct to method Splitter and checking if distinct is true the code broke. The quesry now instead of being dictionary is IEnumerable<string>, but whould be Dictionary<string, int>. How could it be solved? This is the error: Cannot implicitly convert type 'System.Collections.Generic.IEnumerable' to 'System.Collections.Generic.Dictionary'. An explicit conversion exists...

How can I force EF to use joins instead of splitting up a complicated query?

I have a complex IQueryable that I would like EF to populate with a single database query so that I can use it with deferred execution. Please consider the following example. For these models: public enum AlphaState { Unknown = '\0', Good = 'G', Bad = 'B' } [Table("MY_ALPHA")] public...