Geography column returned in stored procedure not shown in Entity Framework auto generated complex type

前端 未结 1 389
执笔经年
执笔经年 2021-01-20 21:15

I\'m using Entity Framework 6 with .Net 4.5. I have a stored procedure that select and returns data. One of the return columns is a geography type.

In Visual Studi

1条回答
  •  醉梦人生
    2021-01-20 21:53

    Entity Framework won't handle this automatically, but it's pretty simple to add the geography column after the procedure is imported.

    1. In the Model Browser, search or navigate to your stored procedure's complex type. Right-click, and select Add -> Scalar Property -> Geography (or any other type that you are missing):

    2. Enter the name of your column:

    3. Save your model.

    0 讨论(0)
提交回复
热议问题