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).
I think your error is that you try to select something from .Database
directly, not from the table. Instead of this code:
from UiType in db.Database
try out something like this:
from UiType in db.UiTypes
select UiType.AdvancedUi;
This should work as the table UiTypes
will implemet the IEnumerable
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 the select
clause - you must use the placeholder there, not the table name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With