Print Page | Close Window

StoreGeneratedPattern = Computed in EDMX

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2012
Forum Discription: For .NET 4.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3861
Printed Date: 26-Oct-2025 at 1:30am


Topic: StoreGeneratedPattern = Computed in EDMX
Posted By: cefernan
Subject: StoreGeneratedPattern = Computed in EDMX
Date Posted: 24-Dec-2012 at 5:39am
Hello,

I use database first approach and I'm writing a test method to assert if a specific property has StoreGeneratedPattern set as Computed in my EDMX.
In the test method I have a DataEntityProperty in my hand and I realize that IsAutoIncrementing property is true when StoreGeneratedPattern = Computed, but IsAutoIncrementing is also true when StoreGeneratedPattern = Identity.

How can I check if the StoreGeneratedPattern is really Computed (not Identity) trough a DataEntityProperty object?

Regards.



Replies:
Posted By: kimj
Date Posted: 24-Dec-2012 at 12:44pm
We don't currently capture this in the DataEntityProperty.  We should be setting IsAutoIncrementing only for Identity properties, so if we're setting it for both Identity and Computed that sounds like a bug.   We can look at fixing this and making both Identity and Computed available on the DataEntityProperty, but for now I'm not sure what you can do as a workaround other than customizing code gen to grab the values from the EDMX.


Posted By: cefernan
Date Posted: 26-Dec-2012 at 8:33am
Ok, if possible you can include Computed on DataEntityProperty and correct the bug. It will help a lot.

Thanks.


Posted By: kimj
Date Posted: 27-Dec-2012 at 2:28pm
Will do.



Print Page | Close Window