我在 SQL 函数中执行以下操作:
SELECT
c.DateValue,
c.DayName,
c.IsPaymentDate,
CAST(CASE WHEN exception.ExceptionDateId IS NULL THEN 0 ELSE 1 END AS BIT) AS IsHolidayPayment,
exception.ExceptionDateID
FROM Calendar c
但是,在实体框架中打开模型时,它会将 IsHolidayPayment 视为 INT。我们需要它是一个布尔值。难道我做错了什么?