Skip to content

Instantly share code, notes, and snippets.

private void ExecuteMigrationScripts(IEnumerable<KeyValuePair<IMigrationScriptFile, string>> scripts, Action<DbTransaction, long> updateVersionAction)
{
using (DbTransaction tran = Database.BeginTransaction())
{
IMigrationScriptFile currentScript = null;
try
{
foreach (var script in scripts)
{
currentScript = script.Key;
@davidhagg
davidhagg / WPF Visual Geometry Border Inside
Created May 5, 2015 04:50
WPF Create Visual with border that appears to be only inside of drawn geometry
private static DrawingVisual CreateVisual()
{
var noBorderPen = new Pen(new SolidColorBrush(Colors.Transparent), 0);
var selectionPen = new Pen(new SolidColorBrush(Colors.Yellow), 20 * 2);
var drawingVisual = new DrawingVisual();
using (var dc = drawingVisual.RenderOpen())
{
StreamGeometry geometry = new StreamGeometry();