c# - Linq join vs contains cast error -
i having issue perplexing me no end. have 2 ways compose on existing linq query. 1 of works.
working:
var splitstatuses = context.split(model.statuses, "statuses"); query = query.where(x => splitstatuses.contains(x.statusfk));
not working:
query = qry in query join status in context.split(model.statuses, "statuses") on qry.statusfk equals status select qry;
the query calling tvf , filtering results based off of return. non-working query works if count, when data, cast error:
system.invalidcastexception: specified cast not valid. @ system.data.sqlclient.sqlbuffer.get_int32()
maybe ef/linq wizard can shed light onto why happening.
Comments
Post a Comment