TL;DR Using ExecuteReader against SQL Server with a query using for xml or for json causes data to be chunked. A single call to ExecuteR....NET .NET Core 2.0 JSON XML SQL Server
At Ritter Insurance Marketing, we continue to invest heavily in Web APIs primarily built on top of ASP.NET Web API 2. To supplement our A...asp.net WebAPI REST
If you CSS, you’re familiar with the browser -prefix. Chrome and Safari have -webkit, -moz for Firefox/Mozilla, and -ms for Edge. As brow...css
We decided not to use Material Design (#reasons) while re-developing our core application suite, although i really miss MD’s micro-intera...UI Sass Semantic UI
Sometimes it’s useful to ensure a project works with multiple versions of runtimes. In the following example, multiple versions of Node.j...AppVeyor
For ASP.NET applications it can be useful to make a request to an application immediately after deployment to bring the application onlin...AppVeyor
https://xkcd.com/1597/ While I generally don’t do that, here’s what I currently do: Setting up a repository locally Using Stuntman as...GitHub
As a team empowered by .NET open source, we’ve always been sensitive to the people, projects, and conferences that make the .NET communit...conference oss team
Previously, I wrote about Publishing to npm Using AppVeyor. This is a similar post, but specifically geared toward publishing an npm pack...AppVeyor npm MyGet
Stuntman is an open source library we developed at RIMdev to make testing user scenarios easier during development time. There are times ...Windows Azure Azure Stuntman OSS
Typically, running a Jekyll site locally for the first time requires a basic knowledge of using the command line. It usually involves a f...jekyll
A picture is worth a thousand words, so I assume a diagram is worth a billion words. Expressing our ideas is important and our blog is an...Jekyll
Before claiming we are in a Renaissance or that it is time for one, we should take the time to understand the meaning of the word and its....NET Community OSS
AppVeyor does not currently provide built-in support for publishing to npm (at least, currently). Instead, we can provide the npm token a...AppVeyor npm
At RIMdev, we are attempting to layer Hypermedia concepts into our APIs. One of these concepts is to have a collection of links to relate...Web API ASP.NET
Transcript Hello my name is Khalid Abuhakmeh and in this video I’ll be presenting an ASP.NET OWIN middleware library designed to eas...video stuntman OSS
This post originally appears on https://www.billboga.com/posts/namespace-changes-with-entity-framework-migrations.
Note: this is only applicable for EF versions less than or equal to six. Version seven (part of .NET Core) has a completely different migration strategy.
EF code-first migrations are an easy way to keep your domain models and database schemas synchronized. However, if you ever decide to refactor your migration namespace, then remember this piece of wisdom: the migration history table stores migration-file namespaces as a column-value. For a quick refresher, here is the schema and sample dataset:
For our sample, assume the pictured migration-file created a new table called
Cars. Further, let us assume I refactor the namespace in the migration-file to
Better.Namespace.Migrations. When I run the app., the following exception is thrown:
SqlException: There is already an object named ‘Cars’ in the database.
This is due, in part, to the migration runner looking in the history table and trying to match
ContextKey with migration filenames and namespaces. It cannot find a match, so it thinks it needs to run our refactored file again. To fix this problem, we just need to update
ContextKey for the
MigrationId row matching our migration filename:
update [__MigrationHistory] set [ContextKey] = 'Better.Namespace.Migrations' where [MigrationId] = '201408121529377_initial_migration';
Restart the app. and we are back in business.