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 -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -