Hello,
I'm new to linq and I'm trying to databind to an anonymous type.
I'm using SubSonic 3.0 as my DAL.
I'm doing a select from 2 tables like so
var myDeal = (from u in db.Users
select new
{
UserID = u.UserID,
UserRoleID = (from ur in u.UserRoles where u.UserRoleID == ur.UserRoleID select ur).FirstOrDefault().UserRoleID
});
foreach (var v in myDeal) //dies first time here
{
}
Then when I databind or try to iterate through the collection I get the "Argument types do not match" error during run time.
I'm not sure what is going on here.