Michael Whelan

behaviour driven blog

Entity Framework Core 1.0.1 Migrations in Separate Assembly

I am getting to grips with Entity Framework Core at the moment and I like what I am seeing so far. There are still a few EF6 scenarios that are not supported yet but the main use cases are supported and there are often workarounds for those that aren't. Entity Framework 1.1 is out soon and features will continue to be added as things just continue to improve. I love the strategic direction the project has taken and, listening to the team discuss the new design, the modular approach and use of dependency injection seems far better, not to mention the massive performance improvements they are already seeing.

When building ASP.Net MVC applications it is quite common to want to store your domain model and data access code in separate class libraries. If this is the case, then ideally you would not even want a reference to Entity Framework Core in your ASP.Net MVC Core project. In this post, I am going to look at how this can be achieved today with the current .Net Core 1.0.1 versions of MVC and EF.

Read more


Semantic Versioning Tests with PublicApiGenerator

When you are following semantic versioning for the public API of your software package, it can be quite easy to accidentally change the API. Jake Ginnivan wrote the PublicApiGenerator package to generate the public API of your package as a string. That way, you can write a unit test that verifies the contents of the string hasn't changed, using an approval test framework, such as Shouldly or ApprovalTests.

Read more


Continuous Delivery for .Net Core with GitHub, Cake, GitTools, and AppVeyor

This is an end-to-end tutorial for setting up continuous integration (CI) and continuous delivery (CD) for a .Net Core project hosted on GitHub using Cake, GitTools, and AppVeyor. Credit for this entire process goes to Jake Ginnivan, who set this up for TestStack's BDDfy open source project, and is actively involved in a number of the GitTools projects referenced here. I have replicated that process for another open source project and documented it here.

Read more


Testing .Net Core with TestDriven.Net

Third party tools vendors are finding it particularly difficult to provide .Net Core support while the tooling is in preview and still subject to a lot of change, but TestDriven.Net is leading the way with a slick Visual Studio testing experience for .Net Core (and earlier versions of .Net). You simply right click on the solution, project, folder, file, or test, and it will run all of the tests in that scope. TestDriven.Net is actually one of the oldest .Net/Visual Studio test runners and is undergoing something of a reboot with support for .Net Core and the next version of Visual Studio, "15."

Read more


A Humanizer Display Metadata Provider for ASP .Net Core

I have always been a big fan of using a Humanizer model metadata provider in my ASP.Net MVC applications. This means that Humanizer will automatically put spaces into labels for multi-word view model property names rather than the developer having to manually add a lot of data annotation Display attributes to those view model property names. The APIs have changed a little for ASP.Net Core, but the approach is basically the same.

Read more


The State of .Net Core Testing Today

.Net Core 1.0 has been officially released but the tooling is still in preview. This means that a number of open source testing libraries have been able to release at least alpha support for .Net Core, but it is not always easy to locate and you sometimes have to drill through GitHub issues, stack overflow questions, and NuGet feeds, to find it. Third party tools vendors are finding it particularly difficult to provide .Net Core support while the tooling is in preview and still subject to a lot of change, but TestDriven.Net has a number of promising alpha releases. In this post, I am going to look at the main .Net testing providers, their current support for .Net Core, and how you can get hold of them.

Read more


Replacing AppDomain in .Net Core

In the move to .Net Core, Microsoft decided to discontinue certain technologies because they were deemed to be problematic. AppDomain was one of those that did not make the cut. While AppDomains have been discontinued, some of their functionality is still being provided. It is quite hard to find those features though, as they are spread across multiple NuGet packages and there is very little documentation at this stage. Issues on github are the best source of information, but there has been a high churn of APIs in this area and a lot of those discussions and APIs are out-of-date. If you have been hunting around for these features then I hope the code samples here will at least provide you with a good starting point and some clues as to where to find related features.

Read more


Porting a .Net Framework Library to .Net Core

I have recently been involved with porting a couple of open source frameworks to .Net Core. It's a brave new world, with lots of new things to discover and learn. In this post I am going to outline the process I've followed to convert my code and a few of the things I've learned along the way. Hopefully, this post will shed some light on the process if you are looking to port your .Net Framework code to .Net Core. Special thanks to Jake Ginnivan who, as always, was a font of knowledge on all things programming during the porting exercises!

Read more


GitHub CVs / Resumes

I just discovered that Github can automatically generate a CV/resume for its users based on the public information in their GitHub account. You have to opt-in by going to their GitHub project page and starring the project. Check out mine at http://resume.github.com/?mwhelan. What a clever idea!

Read more


Review of Pluralsight's Become a Full-stack .Net Developer

This weekend was a long weekend in the UK, and my wife was away, so I took the opportunity to work through Mosh Hamedani's comprehensive 3 part course on Pluralsight, titled Become a Full-stack .Net Developer. The three part series aims to take you from a junior .Net developer through to a senior .Net developer by building an ASP.Net MVC 5 application with Entity Framework 6. I really enjoyed the course and thought I would provide a review of it.

Read more



Google