Tag Archives: Database

C# Connect to 2 or more databases using a Datacontext

This is more of a design pattern than it is a requirement. I use this technique when my application grows in size. When my application needs to connect to 2 or more databases, I use this encapsulation method to allow … Continue reading

Posted in .net, .NET Core, c#, General .NET, Microsoft Azure | Tagged , , , , , , , , , , | Leave a comment

C# Convert array of objects into a DataTable

This extension method lets you convert an array of objects into a DataTable. DataTables are used for SQL inserts. This solution is not mine, in fact it has been copied so many times that I don’t know who came up … Continue reading

Posted in .net, .NET Core, c#, General .NET | Tagged , , , | 1 Comment

C# Dapper Trim String Values

I was calling a stored procedure using Dapper, and for reasons beyond my understanding, the stored procedure returned strings as non-trimmed strings: I could of course look into the stored procedure, but that would require me to obtain new knowledge … Continue reading

Posted in .net, .NET Core, c#, General .NET | Tagged , , , | 2 Comments

Sitecore Transfer items from one database to another

In this article I will describe how to transfer items from one Sitecore database to another. Usually you transfer content by publishing. But in rare cases this is not an option: You are not moving content from master to web … Continue reading

Posted in c#, General .NET, Sitecore 6, Sitecore 7, Sitecore 8 | Tagged , , , | 4 Comments