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
AspNet
AutoMapper, ProjectTo() – Static Version
Full source code available here. I’ve been using AutoMapper for quite a few years, but one of the features that I like the most is the ProjectTo method. When using Entity Framework it lets me reduce the number of fields I query from the database to match the model I want to return to the caller.
Apr 27, 2020
#
AutoMapper
,
Entity Framework Core
,
ProjectTo
,
AspNet
Streaming Results from Entity Framework Core and Web API Core – Part 2
Full source code available here. Some time ago I wrote a post showing how to stream results from Entity Framework over Web API. This approach a few benefits – the results would not be materialized in the API code, a small amount of memory would be used irrespective of the size of the data returned, the results would being steaming as soon as possible and the speed of the request was faster than doing something like .
Mar 20, 2020
#
AspNet
,
Entity Framework Core
,
Streaming
,
WebApi Core
,
WebApi
Fluent Validation in ASP.NET Core 3.1
Full source code available here. This is an update to a post I wrote in 2017 talking about Fluent Validation in ASP.NET Core. The example is the same but there has been few updates.
Feb 22, 2020
#
dotNet Core 3.1
,
AspNet
,
Fluent Validation
Passing Configuration Options Into Middleware, Services and Controllers in ASP.NET Core 3.1
Full source code here. I recently hit a problem where I needed to reload configuration settings as they changed, fortunately, this is relatively straightforward when using the IOptionsMonitor, in .NET Core.
Dec 1, 2019
#
dotNet Core 3.1
,
AspNet
,
Dependency Injection
,
IOptionsMonitor
,
Middleware
,
Options
,
WebApi
Simmy Chaos Engine for .NET – Part 5, Breaking Your Own Code
Full source code here. Want to learn more about Polly? Check out my Pluralsight course on it. The blog posts I have written so far about Simmy all deal with the scenario where you don’t have control over the source code that you want to break, in these cases Simmy policies are applied to the calling code.
Nov 12, 2019
#
AspNet
,
Chaos Engineering
,
Polly
,
Simmy
,
WebApi Core
,
WebApi
Registering Multiple Implementations of an Interface in ASP.NET Core with Autofac
Full source code here. A few weeks ago I wrote a post about using dependency injection to pick between two implementations of an interface. It was a solution I was not very happy with because it meant I had to new up the implementations inside a factory or I had to use service collection to instantiate all implementations of the interface and then use a piece of code to return the one the was wanted.
Oct 27, 2019
#
dotNet Core
,
AspNet
,
Autofac
,
Dependency Injection
,
ServiceCollection
,
WebApi
Simmy Chaos Engine for .NET – Part 4, Doing Some Real Damage, Dropping a Table
Full source code here. Want to learn more about Polly? Check out my Pluralsight course on it. Up until now the Simmy examples I’ve written have thrown exceptions, changed successes to failures or slowed down a request.
Oct 14, 2019
#
dotNet
,
AspNet
,
Chaos Engineering
,
Polly
,
Simmy
,
WebApi
Registering Multiple Implementations of an Interface with Service Collection in ASP.NET Core
Full source code here. This is a simplistic approach to the problem and assumes that the dependencies created by the factory do not in turn have their own dependencies. This deficiency could be mediated by passing those dependencies into the factory.
Oct 1, 2019
#
dotNet
,
AspNet
,
Dependency Injection
,
HttpContext
,
ServiceCollection
,
WebApi
Accessing the HttpContext from the Constructor of a Controller or a Dependency
Full source code here. There are times when you may need to access the HttpRequest from places that it is not normally available such as the constructor of a controller or the constructor of a service that is built by dependency injection.
Sep 15, 2019
#
dotNet
,
AspNet
,
Dependency Injection
,
HttpContext
,
WebApi
Simmy Chaos Engine for .NET – Part 3, Adding Latency
Full source code here. Want to learn more about Polly? Check out my Pluralsight course on it. This is the third in my series on chaos engineering with Simmy. The first two posts dealt with the fault policy throwing exceptions and returning failed responses rather than calling the remote service.
Aug 27, 2019
#
dotNet
,
AspNet
,
Chaos Engineering
,
Polly
,
Simmy
,
WebApi
«
»
Cite
×