tabs ↹ over ␣ ␣ ␣ spaces

by Jiří {x2} Činčura

Store (server) generated values in Entity Framework in Firebird

9 Aug 2008 1 mins 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.

Profile Picture Jiří Činčura is .NET, C# and Firebird expert. He focuses on data and business layers, language constructs, parallelism, databases and performance. For almost two decades he contributes to open-source, i.e. FirebirdClient. He works as a senior software engineer for Microsoft. Frequent speaker and blogger at