Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

.NET Developer Days 2017: Adding History to CRUD – Dino Esposito

What's the problem with CRUD?

Every time you update an existing table record, you automatically lose track of the state it had before.

Possible solution using SQL Server 2016+

From the Microsoft Docs [emphasis mine]:

SQL Server 2016 introduced Support for system-versioned temporal tables as a database feature that brings built-in support for providing information about data stored in the table at any point in time rather than only the data that is correct at the current moment in time. Temporal is a database feature that was introduced in ANSI SQL 2011.

This is really great stuff. The docs on the topic are well written, so head over there to dive deeper into this very interesting feature.

Orchard CMS has versioning built-in

This might be a little known fact, but the ASP.NET MVC based Orchard Cms – which is the engine that powers discoverize – has had support for versioned content for many years now. Just derive your record model class from ContentPartVersionRecord and you're set.

And that's all for now. Happy versioning!



This post first appeared on Shades Of Orange | Our Code Is Orange - Softwar, please read the originial post: here

Share the post

.NET Developer Days 2017: Adding History to CRUD – Dino Esposito

×

Subscribe to Shades Of Orange | Our Code Is Orange - Softwar

Get updates delivered right to your inbox!

Thank you for your subscription

×