no dogma blog
no dogma blog
Blog Posts
Podcast
Web API Lambda Course
Polly Course
Photos
Contact
Support this Site
About
RSS
Light
Dark
Automatic
Posts
Performance Comparison of Entity Framework Core 2.1 and Dapper 1.5
tl;dr - ignore most (maybe all) of the posts out there comparing Dapper and Entity Framework performance, you need to measure it yourself. Here’s why - Some are angry opinion pieces from people who don’t like one technology or the other and clearly haven’t run any tests.
Aug 21, 2018
#
Dapper
,
Entity Framework Core
,
Performance
Alter response header in Web API to return machine name
Full source code available here. I recently hit a problem where I was getting incorrect responses from a server behind a load balancer. Looking at the logs didn’t help because there was no error.
Aug 7, 2018
#
dotNet Core 2
,
AspNet
,
Middleware
,
WebApi
Polly, HttpClientFactory and the Policy Registry in a console application
Full source code available here. Want to learn more about Polly? Check out my Pluralsight course on it. How to use the HttpClientFactory with a console application is not immediately obvious.
Jul 26, 2018
#
AspNet
,
HttpClient
,
HttpClientFactory
,
Polly
,
Polly Registry
Polly, HttpClientFactory and the Policy Registry - choosing the right policy based on the HTTP request
Full source code available here. Want to learn more about Polly? Check out my Pluralsight course on it. The release of .NET Core 2.1 has made using HttpClient much easier. If you have been using HttpClient for a while you will know about its limitations around reuse and DNS expiry, I wrote about this some time ago.
Jul 13, 2018
#
AspNet
,
HttpClientFactory
,
Polly Registry
,
Polly
,
Resilience
Using Other Verbs with Web API
Full source code available here. You will often use the GET verb when making requests to an API. You have probably used it like this - www.example.com/person/ or www.example.com/person/1 or www.
Jun 27, 2018
#
AspNet
,
HTTP Verbs
,
WebApi
,
Web Service
Loading Config from Multiple Sources with .NET Core 2.x Web Api or MVC
Full source code available here. .NET Core 2 and .NET Core 2.1 offer many ways to load configuration and they are well documented by Microsoft. But there is one scenario that I didn’t see explained.
Jun 3, 2018
#
dotNet Core 2
,
dotNet Core 2.1
,
appsettings.json
,
AspNet
,
Configuration
Using the In-Memory Cache with .NET Core Web API
Full source code available here. If you need to store anything temporarily within an application, you should consider using the In-Memory Cache from Microsoft. In .NET Core it is much easier to use than its predecessor from Framework 4.
May 28, 2018
#
dotNet Core 2
,
AspNet
,
Caching
Using Dependency Injection with Startup.cs in ASP.NET Core
Full source code available here. Did you know that .NET Core 2 can pass in an instance of any type you want to the Startup.cs constructor? Well you can! Here’s how.
May 3, 2018
#
dotNet Core 2
,
AspNet
,
Dependency Injection
Getting .NET Core 2.1 Preview 2 Working with Visual Studio 2017
About a year ago I wanted to start using .NET Framework 4.7, it should have been an easy process, but wasn’t. After some trial and error if figured it out and wrote a blog post explaining how to get it working.
Apr 27, 2018
#
dotNet Core 2
,
dotNet Core 2.1
,
AspNet
,
Visual Studio 2017
Setting the Kestrel Port from appsettings.json
Full source code available CoreWithKestrelFromConfighere. In my previous post I explained how to host Kestrel web server running on (the default) port 5000 as a Windows service. But what if you want to run the server on a different port?
Apr 20, 2018
#
dotNet Core 2
,
AspNet
,
Configuration
,
Kestrel
«
»
Cite
×