I have migrated the .NET Transactional File Manager project to GitHub from CodePlex. The library is also available as a Nuget Package. I originally wrote about it in this blog post.
The library allows you do enlist file I/O operations in transactions using System.Transactions. For example you can wrap a SQL Server insert and creation of a new file on disk in the same transaction, and commit or rollback the two operations together as a unit.
Example code:
// Wrap a file copy and a database insert in the same transaction
TxFileManager fileMgr = new TxFileManager();
using (TransactionScope scope1 = new TransactionScope())
{
// Copy a file
fileMgr.CopyFile(srcFileName, destFileName);
// Insert a database record
dbMgr.ExecuteNonQuery(insertSql);
scope1.Complete();
} This library is available as a NuGet package.
dotnet add package TxFileManager Version 1.4 is now available with the following changes/fixes:
To list available contexts: kubectl config get-contexts To show the current context: kubectl config current-context…
kubectl exec -it <podname> -- sh To get a list of running pods in the…
# Create a soft symbolic link from /mnt/original (file or folder) to ~/link ln -s…
git config --global user.name "<your name>" git config --global user.email "<youremail@somewhere.com>" Related Commands Show current…
TypeScript/JavaScript function getLastMonday(d: Date) { let d1 = new Date(d.getFullYear(), d.getMonth() + 1, 0); let…
I had to do some SMTP relay troubleshooting and it wasn't obvious how to view…