I just upgraded to the latest version (2009.2.1012.0).
Previously, after I saved an entity my primary key column (ID, int, Identity=Yes) would contain the value of the autogenerated identity after the save was executed. Now, it's not working the same.
I'm sure this is something easy, but I'm not finding a solution on the forums.
thanks!
Out of habbit, I usually set the ID to -1 for new records. If I do this, then save, it's not returning the updated autogenerated identity value.Dim newBusinessInfo As New DAL.BusinessInfoWith newBusinessInfo .Id = -1 .BusinessName = "some business name"End WithnewBusinessInfo.Save()
If I don't set the ID and then save, it does return the updated autogenerated identity value.Dim newBusinessInfo As New DAL.BusinessInfoWith newBusinessInfo .BusinessName = "some business name"End WithnewBusinessInfo.Save()
This has been fixed and is available in our latest Trial, it wont be in the developer release until our next build. However, to be honest, I'd stop setting it to -1, it just doesn't make sense to do so as a habit?
EntitySpaces | Twitter | BLOG | Please honor our Software License