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

authentication - Mongodb revoke acccess to connect test database -

c - getting error: cannot take the address of an rvalue of type 'int' -

How to merge four videos on one screen with ffmpeg -