How do I tell Entity Framework Function Import that a column returned by a stored procedure is not nullable?

前端 未结 3 1738
小鲜肉
小鲜肉 2021-01-01 18:43

I have an SQL Server stored procedure that ressembles this:

CREATE PROCEDURE [jp].[GetFoo]
    @Guid UNIQUEIDENTIFIER
AS

SELECT
    CONVERT(BIT, (CASE WHEN          


        
3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-01 19:06

    You have to ways to fix this issue

    1- alter procedure to be isnull ("your expression", 0) then update your model from database and refresh .

    2- you can open the class model and change it manually but any update on the model again , you will lost the change .

    So my opinion is the first solution is the best.

提交回复
热议问题