Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is it?
Message
 
 
General information
Forum:
ASP.NET
Category:
Entity Framework
Title:
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01606037
Message ID:
01606059
Views:
52
The problem here is that when we were using EDMX, the key.IsFixedLength property evaluated to true. With Reversed POCO it evaluates to false and therefore this code is not executed and eventually I get an error from EF as it thinks that keys were changed (due to padding).

That is what I added to question and issue in that project.

I also want to check if IsUnicode property is set to false in configurations. I'll check configuration files and may be do some profiling. In our database all columns are char and varchar, we don't use unicode.


>Where exactly is that code. I don't see it in the ReversePoco T4 ?
>Looks more like EF code..
>
>>Hi everybody,
>>
>>We're switching from EDMX to Reversed POCO. I see the following code
>>
>>
>>       
>>            EntitySet entitySet = CoreContext.CreateObjectSet<T>().EntitySet;           
>>            ReadOnlyMetadataCollection<EdmProperty> keys = entitySet.ElementType.KeyProperties;
>>
>>            foreach (EdmProperty key in keys)
>>
>>                 if (key.IsFixedLength.HasValue && key.IsFixedLength.Value)
>>                {
>>                    if (key.PrimitiveType.PrimitiveTypeKind == PrimitiveTypeKind.String)
>>                        etc.
>>
>>
>>
>>The IsFixedLength property is false and it doesn't go into the loop. However, the actual column in the table is CHAR(6), so it is supposed to be FixedLength. I think when we were using EDMX, that property was correctly set.
>>
>>What should I do to fix the problem now?
>>
>>UPDATE. I added a question on Reverse POCO Generator site. The author seems very responsive so I hope to get an answer soon.
>>
>>http://visualstudiogallery.msdn.microsoft.com/ee4fcff9-0c4c-4179-afd9-7a2fb90f5838/view/Discussions/1
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform