Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using EF with a view
Message
From
18/12/2015 04:32:38
 
General information
Forum:
ASP.NET
Category:
Entity Framework
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01629081
Message ID:
01629094
Views:
34
>Right, good point and this is what I've been looking at right now as well. The configuration was created automatically and right now the key is not defined correctly (it is based on all columns in the table). I'll see if re-running the tool will fix that problem.
>
>There is another view which also seems to have wrong configuration (instead of a valid key it uses several columns as a key). I think that view works fine, but I haven't been testing it for some time.
>
>I'm wondering if with schemabinding is enough to pass the table's key back to the view or I have to change all columns to use cast(col as ..) in order to make them nullable and not keys.
>
>UPDATE. With schemabinding didn't work. I'll try casting all columns to proper types to make them nullable and see if it helps.
>
>UPDATE. It works without schemabining but I do need to apply the cast trick to make only PK to be PK in the view.

Check this : http://blogs.msdn.com/b/alexj/archive/2009/09/01/tip-34-how-to-work-with-updatable-views.aspx
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform