On Mar 11, 4:17 am, Watermelons <[email protected]> wrote:
> I have a table called Events and one called Staff and a linking table
> called EventStaff. I create a new EventStaff object and try to assign
> an existing Staff record to it. I get an exception when I hit this
> code:
>
> Edu.EventStaff newEventStaff = new Edu.EventStaff();
> newEventStaff.Staff =(from Edu.Staff staffMember
>   in EduDContext.Staff
>   where staffMember.ContactID == (int)currentBooking.EduContactID
>   select staffMember).Single();
>
> S0133: Implement QueryMethod Queryable.Cast.

This error seems to mean that a method called "Cast" is used within
the query expression and that it can not be converted to sql. So my
guess would be, that it is the "staffMember.ContactID ==
(int)currentBooking.EduContactID" part that is causing the problems.
You might double check the data type of "ContactID" or put
"(int)currentBooking.EduContactID" in a temporary variable.

--
Anders

-- 
You received this message because you are subscribed to the Google Groups 
"DbLinq" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/dblinq?hl=en.

Reply via email to