Issue 211 in dblinq2007: Implement support for Queryable.Cast

0 views
Skip to first unread message

dblin...@googlecode.com

unread,
Mar 11, 2010, 8:34:00 AM3/11/10
to dblin...@googlegroups.com
Status: Accepted
Owner: jonmpryor
Labels: Type-Defect Component-DbLinq Priority-Medium

New issue 211 by jonmpryor: Implement support for Queryable.Cast
http://code.google.com/p/dblinq2007/issues/detail?id=211

What steps will reproduce the problem?
1. Create a query that contains a cast, and run it

Edu.EventStaff newEventStaff = new Edu.EventStaff();
newEventStaff.Staff = (from Edu.Staff staffMember
in EduDContext.Staff
where staffMember.ContactID == (int)currentBooking.EduContactID
select staffMember
).Single();

See also:
http://groups.google.com/group/dblinq/browse_thread/thread/855c6fb79bc30616

What is the expected output? What do you see instead?
Expected output is no exception (or a reasonable exception if there is no
data).

Actual output is: S0133: Implement QueryMethod Queryable.Cast.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

dblin...@googlecode.com

unread,
Mar 13, 2010, 7:43:09 PM3/13/10
to dblin...@googlegroups.com

Comment #1 on issue 211 by anders...@gmail.com: Implement support for
Queryable.Cast
http://code.google.com/p/dblinq2007/issues/detail?id=211

I was not able to reproduce using the northwind database and this query:

object empId = 1;
var et = new EmployeeTerritories();
et.Employees = (from e in nwind.Employees
where e.ReportsTo == (int)empId
select e).Single();

So there seems to be a bit more to it.

dblin...@googlecode.com

unread,
Mar 15, 2010, 4:36:00 PM3/15/10
to dblin...@googlegroups.com

Comment #2 on issue 211 by jonmpryor: Implement support for Queryable.Cast
http://code.google.com/p/dblinq2007/issues/detail?id=211

As per http://groups.google.com/group/dblinq/msg/5663128659a64096, it looks
like the
problem is that a type is declared in the 'from' expression:

from Edu.Staff staffMember in EduDContext.Staff ...
^^^^^^^^^^^^^^^^^^^^^

as opposed to the more "normal"

from staffMember in EduDContext.Staff ...
^^^^^^^^^^^

dblin...@googlecode.com

unread,
Mar 31, 2012, 9:52:17 PM3/31/12
to dblin...@googlegroups.com

Comment #3 on issue 211 by tos.oliv...@gmail.com: Implement support for
Queryable.Cast
http://code.google.com/p/dblinq2007/issues/detail?id=211

Please, try out the solution on the link below:
http://code.google.com/p/dblinq2007/issues/detail?id=132#c2

Reply all
Reply to author
Forward
0 new messages