My error is:
Could not find an implementation of the query pattern for source type
'System.Data.Entity.Database'. 'Select' not found.
My relevent code is:
DatabaseEntities db = new DatabaseEntities();
var whichUi = from UiType in db.Database
select AdvancedUi;
I am using the linq import (common answer on other threads).
Best Answer
I think your error is that you try to select something from
.Database
directly, not from the table. Instead of this code:try out something like this:
This should work as the table
UiTypes
will implemet theIEnumerable
interface.You should put your table name after the in keyword.
UiType
is just a placeholder, and can be anything you want. Please, pay attention to theselect
clause - you must use the placeholder there, not the table name.