Category Archives: Development

Dotnet development

Bogus – testdata generator

Photo by Steve Harvey on Unsplash https://www.nuget.org/packages/bogus Creating testdata is not my favourite task. With bogus I can define the rules the data must adhere and generate as much data as I need. The rules are setup with fluent syntax … Continue reading

Posted in Development, Tooling | Tagged , , , | Leave a comment

EF core: entity cannot be tracked

We use EF core to store a bulk of data with an auto-number primary key. The auto-number is an Identity column in Sql Server. When inserting a large amount of records with related children we encounter this error: System.InvalidOperationException entity … Continue reading

Posted in Development, Tooling | Tagged , , , | Leave a comment

Logging from Automapper

We’ve been using automapper to convert objects for some time. Now I have the need for logging to help bugtracking. Below a short list of sources how we set this up. And now you’ll need a serviceprovider when unittesting. Thank … Continue reading

Posted in Development | Tagged , , , | Leave a comment

AutoMoqCore – auto mocking IoC

Photo by Phillip Glickman on Unsplash https://www.nuget.org/packages/AutoMoqCore/ Dependency¬†Inversion¬†is one of the SOLID principles. This can be applied to unittesting as well. With AutoMoqCore I can develop robust unittests that will always compile. Focus on the smallest possible code for your … Continue reading

Posted in Development, Tooling | Tagged , , , | Leave a comment

Update SEQ with Powershell DSC

We user Powershell Desired State Configuration (DSC) to install everything. A new installation could be done to a clean machine or by removing existing software prior to installing it. Below is part of the script we use. Now we want … Continue reading

Posted in Development, Tooling | Tagged , , , | Leave a comment

Visual Studio Code naming convention

I’ve been using the Visual Studio 2017 naming convention to generate code the way I like. Now I want to apply this behaviour to Visual Studio Code on my MacBook. Private fields should start with underscore: First install EditorConfig from … Continue reading

Posted in Development | Tagged , , | 1 Comment

EF codefirst migrations and Cloud Foundry

We’re using the hosted Cloud Foundry solution for development at http://run.pivotal.io. So everybody can hit the floor running I’ve created a template for using Entity Framework Codefirst migrations in a dotnet core web application hosted on Cloud Foundry. The key … Continue reading

Posted in Development | Tagged , , , | Leave a comment