Wednesday, December 10, 2014

'System.Linq.IQueryable' does not contain a definition for 'Include' and no extension method 'Include' accepting a first argument of type 'System.Linq.IQueryable' could be found

Error: 'System.Linq.IQueryable' does not contain a definition for 'Include' and no extension method 'Include' accepting a first argument of type 'System.Linq.IQueryable' could be found

Solution: Add namespace System.Data.Entity; 
Actually Include is not an extension method on Queryable, so it doesn't come with all the usual LINQ methods. 
If you are using Entity Framework, you need to import namespace System.Data.Entity:
Read More

Tuesday, December 9, 2014

the type or namespace name 'expression' could not be found

To remove error "the type or namespace name 'expression' could not be found" Add namespace System.Linq.Expressions. as normally System.Linq is there in using part by default and expression class is under system.Linq.Expressions so we have to make it also in using.
Read More
Powered By Blogger · Designed By Seo Blogger Templates