开发者

Database computed column not generating in EF 4.1

开发者 https://www.devze.com 2023-03-12 15:52 出处:网络
I have a开发者_StackOverflow社区 database table with a computed column CREATE TABLE [dbo].[User] (

I have a开发者_StackOverflow社区 database table with a computed column

CREATE TABLE [dbo].[User]
(
    [UserId] [uniqueidentifier] NOT NULL,
    [PersonalityType]  AS ([dbo].[GetPersonalityType]([UserId]))
)

And a scalar function [dbo].[GetPersonalityType] that aggregates and filters data from another table. The computed value is not persisted in the database (because it is non-deterministic, I am told).

When I update the entity framework model from the database the computer column PersonalityType never shows up. What is wrong? Can EF 4.1 model computed columns in this situation?


I'm not sure how you can get this to work, but try playing with a lot of properties and then regenerating it a lot. ;-)

0

精彩评论

暂无评论...
验证码 换一张
取 消