Shawn Wildermuth

The Blog

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


Re-thinking Running Migrations and Seeding in ASP.NET Core 2.0

SeedBack in ASP.NET 4, I really liked the way that it supported running migrations and seeding of the database for you. But in ASP.NET Core and EF Core, that hasn't come to the table yet.

I doubt it actually needs to happen because since ASP.NET Core gives you much more control over the life cycle of the web project. In Entity Framework Core, I've been using an approach to run migrations and seed the database that I kind of crufted together in the Betas. I don't think it's working.

Back when I realized that you couldn't just use the seeding and initialization from EF6 in Entity Framework Core, I looked at a few solutions and pick and choose what made the most sense to me. This is what I had come up with:

Read...


New Year, New Skills: ASP.NET Core 2.0 and Angular Course

Nothing starts a new year like a new skill or two. A couple of months ago I released a new Pluralsight course on building a website using ASP.NET Core 2.0 and Angular.

If you're looking to prepare for the future of web development, I think my course does a good job of teaching the technologies involved. This is a great time of year to start looking at the new stack.

If you haven't taken one of my courses before, you might be surprised by the way that I teach. This course walks you through building a website from File->New to publishing the site. The course covers the following topics:

Read...


End of the Year Review

In the FjordsWith the New Year coming, I thought I'd look back at the last year in my life. Warning this is going to be technical and personal, that way I can turn 50% of the people off with every sentence...just a different set of people with every paragraph ; )

I've had a tough few years, but overall this has been a good year in the Wildermuth house (removing entirely our Political climate which I won't talk about here). It's not been easy, but it's been good. That's the way it usually is for me.

One of my favorite lines from music is "Every five years or so I look back on my life, and I have a good laugh." 1 That's how I have felt most of my life. This year is no different. One constant is my life is that I'm constantly trying to learn something new, whether that be technology or anything else. Here are some categories of my life that I'm looking back at:

Read...


Reverse Engineering Existing Databases in Entity Framework Core 2

ScaffoldingIn my ASP.NET Core 2.0 Pluralsight course, I specifically teach how to build DbContext classes and the POCO classes that go with them. But I've been getting many questions about how to work with existing databases, so I thought I'd explain it in a blog post.

I purposely teach the DbContext and POCO classes first because I want the students to understand what is happening. The process of using it with an existing database generates sometimes a large amount of code.

Before you get started, you'll need to make sure the project has some required packages and tools. If you open up your .csproj file, you'll need to add EntityFrameworkCore.Design and SqlServer (or whatever database you're using) as references:

Read...


Ending the Kickstarter

Commodore 64I want to start by thanking everyone who contributed to the Hello World Film Kickstarter. It's been a humbling exercise. I've learned a lot along the way too.

The film is still happening, but the Kickstarter is being canceled today. No one's pledges will be processed. Let me tell you a little about why and how you can continue to help if you're still excited about the project.

The goal of the film is to help demystify the developer and talk about my own journey as someone who look like what the media says software developers look like and my realization that it shouldn't be true. That, as an industry, we're missing out on the variety of different kinds of people in our industry that would make it a lot better. That's the story I am telling.

Read...


Two Weeks Left in My Kickstarter!

It's been a crazy month for me. I've been spending a lot of time annoying my Twitter followers with announcements about the Kickstarter.

If you're interested in what I'm trying to do, you're running out of time to back my project. It's only two weeks left before the Kickstarter ends.

If you want to back the film, you can pick between a t-shirt, laptop sticker, access to stream the film, a signed CD, preview of the film, quarterly video updates, or even a private screening of the film with a Q&A (North America only). Every dollar helps! Back it here:

Read...


ASP.NET Core 2.0 and the End of Bower

Bower is still being maintained, but they're recommending that people move their projects to Yarn and Webpack. As you may not know, I'm on a sort of campaign to avoid the complexity of something like Webpack until you really need it.

In addition, some libraries aren't supported by Bower (e.g. Angular 2-5) so I wanted to finally end my use of two package managers when I needed Angular. My decision has been to use NPM instead of Bower since that's where Angular lives at and is a huge ecosystem thanks to node.

UPDATE: Seems that Yarn isn't tied to Webpack like I thought. Sorry for the confusion. I've removed that from the article and will have a new article on Yarn soon.

Read...


Hello World: The Film - Kickstarter

Kickstarter If any of my readers are familiar with my podcast, you'll know I love talking to developers. I want to understand why we do we what we do and how that started in their lives.

To this end, I've decided to make a documentary film about developers. I have several goals for the film, but the over-arching theme is to help people understand the role of code and coders in their daily lives.

I've been to a myriad of parties in my life and when asked, I often, sheepishly, say "I'm into computers". But that's not a sufficient answer. It's enough for many people to shrug it off and stop asking questions, but I think if most people got a sense of what we do, they'd find it interesting. That's where the idea for "Hello World: The Film" came from.

Read...


Visual Studio Field Refactoring Trick

Visual Studio I've been using a new trick on my courses as of late that I've been getting some questions about. I figured I'd just blog about it to share the trick.

The trick in question is taking a constructor parameter and storing it in a class field. Most of it is just refactoring, but there is a way to customize what it looks like.

I like to use factoring to build up my code as I write. I'm not a Resharper guy, but i'll use it as much as I can. I just don't like to re-setup Resharper on every install. I'm basically lazy.

Read...


Learning Web Development with Pluralsight

Pluralsight As many of you know, I'm a Pluralsight author and I've been writing courses for the site for a long time now. I have over twenty courses to my name. While my ASP.NET Core courses get a lot of attention, I've been trying to help people get started in general web development through my courses.

To this end, I wanted to answer the question I get a lot of times about how someone would transition into web development from desktop or other programming (or even completely new to the field). This post's purpose is to help people see what Pluralsight courses (mine and others) would be a good primer into web development.

While this isn't a Pluralsight learning path, it's what I suggest to get started with web development on the Microsoft stack (using open source tools and technologies).

Read...