by dotnetnerd
18. November 2017 20:25
I recently worked on a long running migration project, where we needed to ensure that some of the sql migration scripts were only called once per entity that was migrated, in a threadsafe manner. I looked to the System.Collections.Concurrent namespace, but none of the classes were really a good match. Basically what I needed was the ability to run a part of the migration that was identified by key, but ensure that it would only run once, although different parent strategies might try and run it.
More...