c# - Make entity framework interpret stored procedure result set column as bool instead of int? -


i have stored procedure runs this:

select      colorid,      colorname,     case       when colorid > 5 1       else 0 end isnewcolor      colors       colorid = 5 

when import function , create complex type, thinks isnewcolor int.

i tried returning 'true' or 'false' thinks it's string.

i can change complex type bool, possible write sql differently or else make "create new complex type" realize should bool?

wrap case statement in cast set bit type

cast(    case       when colorid > 5 1       else 0 end    bit) isnewcolor 

Comments

Popular posts from this blog

php - Extract Text from HTTP referer -

Receive udp packets in android gstreamer -

authentication - ASP.NET Core 1.0. Bearer Token, cannot access custom claims -