Category Archives: Core

Home / ASP.NET / Core
47 Posts

A friend of mine asked me yesterday how one would go about having an AutoMapper configuration such that you have multiple mappings for the same object pairs. This is an interesting situation for which I didn’t have an immediate answer. But, after playing around with AutoMapper a bit, my choice was to utilize a factory to provide multiple IMapper instances.

More Link

I’ve written a fair bit of demos for Angular 2.x/4.x using Plunker. Plunker provides a pretty convenient way to demo Angular concepts, but the fact that the code is rendered in the browser doesn’t make it overly useful for building redistributable, or production, applications. Since many people have asked me how to take some of my demos from Plunker to a Visual Studio project, that’s what I decided to do.

More Link

A while back, I blogged about using Quartz for scheduling jobs. Recently, I needed to make an API that could trigger jobs, and I thought of Quartz. There is a need/desire in this use case to prevent concurrent execution of jobs when the API is accessed and triggers jobs, and I didn’t really want to stack/queue jobs either. Quartz has some nice mechanisms to achieve exactly what I wanted.

More Link

In continuing my efforts to process emails in .NET Core, I needed a way to send styled emails with images and such. Previously, I would have manually handled this by replacing text here and there, but using Razor Views seemed like a much better alternative. Considering that the processing would be handled in my domain layer, all of the views would be generated from embedded resources in a class library.

More Link

Earlier, I was dinking around with some base code I wrote for EF 6.x and recently ported over to EF Core. It’s a nice bit of code that can build LINQ expressions for nearly any search/query scenario regardless of the domain models behind the scenes. It utilizes the LINQ Expression libraries and some reflection. The code works fine in EF 6.x, but I ran into a weird issue when building expressions for many-to-many relationships.

More Link

I’ve been playing around with Authorize attributes in .NET Core as of late. With a custom (derived) authorization attribute, it seemed like it wasn’t always being evaluated. This caused me to pause and take a step back to examine using the built-in policy-based authorization.

More Link

I’ve previously blogged about dealing with SSL in a .NET Core application. Well, I wanted to expand upon this a bit when debugging in Visual Studio 2017. In the case of working with a development environment, this needs to tie into the launch profiles. Without handling this properly, IISExpress integration is broken which becomes an annoyance.

More Link

.NET Core doesn’t have built-in support for LDAP (Active Directory). This can be a show-stopper for a lot of projects. It was a bit of a show-stopper for me earlier as well.

So, references to these libraries won’t be available:

System.DirectoryServices
System.DirectoryServices.AccountManagement
System.DirectoryServices.Protcols

But, there are alternatives to mitigate the problem.

More Link