Linq when using GroupBy, Include is not working

Include demands that the shape of the query doesn’t change. It means that your query must return IQueryable<Match>. GroupBy operator is probably considered as shape changing because it returns IQueryable<IGrouping<TKey, TSource>>. Once the shape of the query changes all Include statements are omitted. Because of that you cannot use Include with projections, custom joins and … Read more

Convert anonymous type to new C# 7 tuple type

Of course, by creating the tuple from your LINQ expression: public (int id, string name) GetSomeInfo() { var obj = Query<SomeType>() .Select(o => (o.Id,o.Name)) .First(); return obj; } According to another answer regarding pre-C# 7 tuples, you can use AsEnumerable() to prevent EF to mix things up. (I have not much experience with EF, but … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)