Sql Server application roles with Entity Framework Code First Migrations

A time ago I have been writing about the Sql Server application roles, what are the benefits of using them and what are the limitations when we want to incorporate the Entity Framework to use application role. Today I will show you how to workaround those limitations with new Entity Framework facility introduced in version 6 of the framework. I am specifically talking about dat…

By Mirek on (tags: Application Role, Entity Framework, SQL Server, categories: architecture, code)

A confusing connection problem using Entity framework and Migrations

Recently I have stumbled upon a strange exception that raised in my application. It has led to an exception with a confusing message “Could not determine storage version; a valid storage connection or a version hint is required.” Thankfully I have solved this issue finally. I have check that it also occurs on the latest version of Entity Framework which currently is 6.1.2. To r…

By Mirek on (tags: EF, migrations, categories: code)

Wix Toolset – custom action to preserve connection string on upgrade

In my previous post I showed you a standard template of WiX installer. Today you will see how to add a custom action to the installer so you can perform more customized operations during the application installation process. The custom action, which I am going to present in this post, will expose a method that extracts the value of specific node of provided xml file. The action…

By Mirek on (tags: Installer, WiX, categories: code)

WiX based Installer– Boilerplate

WiX Toolset is a technology to create Windows installers for your software. It is open source and free for use, but as many of free things is not super user friendly. The creation of the installer is XML based. In this post I will try to present a kind of boilerplate template which you can use to quickly create most of the need installer. Once you have the Wix Toolset installed…

By Mirek on (tags: Installer, WiX, categories: tools)

Learning SQL Server Reporting Services

If you are looking for a good starting point to learn SQL Server reporting services I have two links for you. I can recommend those two tutorial which I found in the web. First is this 22 lessons text tutorial with many screenshots. And the second is a video tutorial which consists of 26 video lessons and is available here. Cheers…

By Mirek on (tags: SSRS, categories: tools)

Autofac and MEF integration

A time ago I have presented a way of implementing wpf plugins with use of Managed Extensibility Framework. Today I will show you how to integrate your MEF exports with Autofac dependency container. For that we will need of course MEF which is stored in System.ComponentModel.Composition assembly, Autofac and Autofac.MEF packages. Having that in place we can manage our MEF export…

By Mirek on (tags: Autofac, MEF, Plugins, categories: architecture)

Version tolerant XML Serialization

One of the beauties of xml, is that it can be extended without breaking applications. You can add element to the xml document tree and the application should not crash or fail while consuming this xml. This is what we can read on the w3schools.com xml tutorial. But how is this with serialization of the xml? Recently I found a guide on MSDN which is called Version Tolerant Seria…

By Mirek on (tags: Version Tolerant Serialization, XML, categories: architecture, code)

Mapping XML column with XSD schema validation in EF Code First

The XML data type allows storing a xml content in our SQL Server database. The great feature is that we can also attach an XSD schema to it and have the xml content automatically validated. Here I am going to show you how to set it up together with Entity Framework Code First. Storing XSD Schema in database and mapping entity One could ask: what is the point of validating the x…

By Mirek on (tags: Entity Framework, SQL Server, XML, XSD, categories: architecture, code)

InitialCreate migration and why is it important

Entity Framework migrations is indeed a great feature. It makes you don’t need to worry about the database schema updates almost at all. There are however few things you must know to properly understand and use EF migrations. This post describes few of those things. Usually when you start a new project which makes use of Entity Framework and you starts developing it with a defa…

By Mirek on (tags: Entity Framework, migrations, categories: architecture, tools, code)

Changes are coming – ServiceWorker

ServiceWorker is a newly developer spec for the web; currently supported by Chrome, Firefox and Opera. Instead of writing a post about it, I’m going to redirect you here. It’s an excellent presentation from a guy who’s working on it. I highly recommend to watch it. No idea how much change this feature will bring, but I must admin, it’s got a very big potential. Cheers, Chris…

By on (tags: serviceworker, categories: web)