tabs ↹ over ␣ ␣ ␣ spaces

by Jiří {x2} Činčura

Store (server) generated values in Entity Framework in Firebird

9 Aug 2008 Entity Framework, Firebird

You know, server generated values - not only autoincrements are very useful think. Entity Framework supports two types “Computed” and "Identity". When you update or insert entity, these fields are automatically refreshed according to state in database (after calling SaveChanges). For more info look at StoreGeneratedPattern.

In Firebird, there’s no identity or autoincrement. Firebird uses generators (sequences) and triggers, but this isn’t problem. When you provide some value, it will be rewritten. Anyway, computed fields are supported and you can use it. When you generate model from DB, fields are correctly marked in SSDL and when inserting or updating entity, these fields are refreshed. I’ve finished “refreshing” implementation today, so feel free to test weekly builds.