Shawn Wildermuth


My Rants and Raves about technology, programming, everything else...

EntityFrameworkCore Logging in ASP.NET Core

Julie LermanI was reading my newest issue of MSDN Magazine and came across Julie Lerman's great article on how to configure Logging in Entity Framework Core. While this is great information, it only covered logging Entity Framework Core from a non-ASP.NET Core project so I figured I'd explain how to do it in ASP.NET Core.

The biggest thing that is different from the way that Julie shows this is that ASP.NET Core automatically wires up the ASP.NET Core logger to the context when it injects a context into your project. So to see Entity Framework Core logging, you need to enable it your ASP.NET Core logging, not in Entity Framework Core.

Saudi Arabia User Group Talk

I had the great fortune of doing a remote presentation for a user group in Saudi Arabia. I showed the basics of ASP.NET Core and I loved the questions from the audience.

In general I don't prefer to do remote talks, but with my self-imposed land-locking, I'm available for them for your group if you have a meeting coming up. So as promised, here is the code and slides:

LinkGenerator in ASP.NET Core 2.2 (Updated)

ASP.NET Core As ASP.NET Core 2.2 is now in preview, i've been looking at some of the early features for an update to one of my Pluralsight courses. ASP.NET Core 2.2 includes a number of new features, but this is a feature I really like.

If you haven't seen the whole list of new ASP.NET Core 2.2 features (in Preview 3 as of the updating of this post), take a look at the announcement here: blogs.msdn.microsoft.com.

Talking Vue with .NET Zuid

.NET ZuidIf you're not in the south part of the Netherlands, you might have missed my most recent appearance last night. Great hosts, guests and sponsors make the night and easy and fun talk.

After a long day at Techorama NL, I was whisked away to Eindhoven for a talk at the .NET Zuid group (e.g. Southern .NET Group). I was able to show them the basics of Vue.js and pontificate about my continued hatred of the phrase "Single Page Applications".

Techorama Netherlands Wrap Up

TechoramaFinally heading home from about a month of conferences! I can't wait to get back to my own bed, but in the mean time I've had a great time sharing talks with a lot of European developers!

This time I was in Ede, Netherlands for the first Techorama outside of Belgium. As usual, the team did an amazing job! Here are the slides and code as promised from that event:

Off the Road

I'm in the middle of a road trip for three conferences and it's been an amazing time. Next up is Techorama Netherlands! I am lucky to be asked to speak at so many amazing conferences.

As so many of you know, I travel a lot for speaking and work. This year has been a tumult of experiences and emotions. With my film finally heading into post-production I've made a decision about conferences for the next fifteen months or so.

.NET Developer Days Poland Wrap-up

WarsawHad a great week here in Warsaw! Got to see some great sights and great developers!

Thanks to the great team behind .NET Developer Days! Great group of attendees that asked some great questions.

Intellisense in ASP.NET Core Projects That Use NPM?

NPM Packaging I've been advocating using NPM for a client-side package manager in the last few months since Bower support has been depreciated. And while this works pretty well (using Scott Allen's UseNodeModules middlware) to allow you to just point at the NPM folder.

Of course, for production, this isn't a great solution. I've been showing people to use Gulp or WebPack to copy only the files you need in production. But for development, there is a problem: Intellisense.

Seeding Related Entities in EF Core 2.1's HasData()

Julie LermanIf you didn't notice, Entity Framework Core 2.1 has a new way to support seeding your databases with a method called HasData. Julie Lerman has a great new Data Points column in MSDN that explains how a lot of it works.

Go read that article first. It really covers the basics. Unfortunately, for my use, her article missed a tiny detail that I think is useful. But let's start with a brief overview of how HasData works.

Avoid Lazy Loading in ASP.NET

Sad CatI know I am not going to make everyone happy with this post. I've been hoping to not have to make this post, but Entity Framework Core has finally added support for Lazy Loading, so it's time.

This problem is not new. Entity Framework (not Core) also has this problem. But it's far easier to accidentally do this in that version. Luckily, Entity Framework Core has made it harder to inadvertently turn it on. Let's see what's wrong with Lazy Loading in Web Apps.

Shawn
Shawn Wildermuth
Author, Teacher, and Coach




My Courses

Wilder Minds Training
Vue.js by Example (Now Available)
Bootstrap 4 by Example
Intro to Font Awesome 5 (Free Course)
Pluralsight
Less: Getting Started (Coupon Available)
Building a Web App with ASP.NET Core, MVC6, EF Core, Bootstrap and Angular (updated for 2.1)
Using Visual Studio Code for ASP.NET Core Projects
Implementing ASP.NET Web API
Web API Design

My Appearances


Application Name WilderBlog Environment Name Production
Application Ver v4.0.30319 Runtime Framework x86
App Path D:\home\site\wwwroot\ Runtime Version .NET Core 4.6.26919.02
Operating System Microsoft Windows 10.0.14393 Runtime Arch X86