I have this error in this linq expression :
var naleznosci = (from nalTmp in db.Naleznosci
where nalTmp.idDziecko == idDziec
Just ToList()
the DbSet
before the Select
statement..
the actual DbSet
is saved as a query, it's not fulfilled yet.
After calling ToList()
you're playing with objects, and then you can use a non-default constructor in the query.
Not the most efficient way usage-time wise, but it's an option on small sets.