Entity framework code first convert between class boolean and column integer

前端 未结 2 956
粉色の甜心
粉色の甜心 2021-01-13 02:56

I am using Entity Framework 5 code first. My table has a column called Active and its datatype is of type int. The values that are st

2条回答
  •  甜味超标
    2021-01-13 03:21

     SELECT   CONVERT(A.bitcolumn as bit) as bitout
    

    ado.net will convert bits to bools. So, just convert your integer to a bit in your select statement in t-sql.

提交回复
热议问题