The .NET Stacks #4: EF Core, PresenceLight, community roundup!

This is an archive of my weekly (free!) newsletter, The .NET Stacks. Consider subscribing today to get this content right away! Subscribers don’t have to wait a week to receive the content.

A busy issue this week, as we discuss:

  • Checking in on Entity Framework Core
  • PresenceLight with Isaac Levin
  • Community roundup

Checking in on Entity Framework Core

The Entity Framework team had a community standup this week. I believe the EF standups are new and it’s a great way for the community to get more visibility into what the team is working on - as EF is a crucial piece of the .NET ecosystem with a very demanding audience (this is data access, after all).

They chatted with Erik Ejlskov Jensen - known in the community as ErikEJ - and he showed off his EF Core Power Tools. These tools allow GUI-based EF Core support in Visual Studio. The use cases include reverse engineering existing databases, creating migrations, and creating diagrams of your models. Because the EF team is focused on cross-platform support, their tooling is focused on a streamlined command-line interface (CLI)/PowerShell toolset. As such, with no native GUI support for EF Core in Visual Studio, this fills a great need - and with almost 90k downloads, you may already be familiar.

The team also previewed some new EF Core 5.0 bits, slated for release when .NET 5.0 ships in November. They discussed using ToLog(), a quick-and-dirty way to get up and running with basic EF logging with no logging dependencies required.

When EF Core was released with a limited feature set of EF6 capabilities, they’ve been swamped with developers screaming, with varying levels of politeness, “when will this be in EF Core?” (I admit, I took a turn myself.) I do think it’s important to point out that with engaging with the community, the team is giving the community a better idea of what’s on the radar. For example, if you look at the EF Core 5.0 plan, you’ll see the top 3 most requested features are being addressed:

Dev discussions: Isaac Levin

Introducing a new feature where I talk to folks from Microsoft and across the community about what they’re working on.

If you watched Scott Hanselman’s keynote at Microsoft Build (you know, the “self-hosted” one), he showed off changing room lighting to your status in Teams (or Slack, Skype, etc.) and matching any background colors to your smart lights with the click of a button! This was brought to you by PresenceLight, a WPF app developed by Microsoft’s Isaac Levin. I caught up with Isaac to talk about his path to Microsoft, the development of the app, and advice for developers.

What motivated you to develop PresenceLight?

PresenceLight was something I had been thinking of for a bit. I wrote about it in my blog, but mostly it centered around there being no real solution to push your Teams status (called Presence) to a smart light. There are solutions that are tethered to your machine via USB or a Bluetooth dongle, but nothing that runs independently. When the Microsoft Graph team made Presence available from an API, I started working on a solution pretty quickly.

Can you walk through a quick high-level architecture of your solution?

The solution is a WPF application running on .NET Core 5, which is in preview. In summary: the end user opens the app and gets prompted to log in to Microsoft 365. My application gets a token from Azure Active Directory and makes subsequent requests to the Graph API to get the user’s profile info and presence. The app polls the API based on the user settings and broadcasts that presence to every enabled light. Check out more in-depth things at the wiki on GitHub.

Any future plans for PresenceLight? Are you going to Blazor all the things?

One of the things I realized very quickly is that WPF running on Windows is a bit of a blocker for lots of developers. I wanted to create a solution that could run on a Mac or Linux…and I came to the idea if I had an ASP.NET Worker running …that does polling and light broadcasting, I wouldn’t need a UI always open, and wouldn’t have UI thread blocking issues to worry about.

I built a server-side Blazor front-end that would act as the login mechanism to Azure AD and allow the user to manage configuration, with all the lifting being done by the Worker. Because both are ASP.NET Core projects, they can actually run in the same project, so there was one endpoint to use.

I’m also leveraging .NET Core 5 single file executable publishes, which allow the built payload to be very minimal. Right now, you can get a build from the Releases page and it will just work with Windows, Mac, Linux, and WSL2.

What is your one piece of programming advice?

The one piece of advice I have is to not worry about your quality as a developer. For a long time in my career (and still to this day) I don’t think I am any good. But honestly, whatever you think isn’t probably true. Are there bad developers? Of course. But there are far more good developers to think they are bad.

The only way you fix this is to alter your mindset, and write code and learn. Take an opportunity to learn new things, watch dev streamers, read docs, whatever you can to learn. Slowly you will realize the only thing that was causing your imposter syndrome was in your head.

For more information on PresenceLight, check out the GitHub repo (where you can find the releases), Isaac’s blog post, and of course you can always contact him on Twitter.

Check out the full interview at my site.

Odds and ends

Microsoft introduced this week a “Web Live Preview” Visual Studio extension for .NET Framework customers to get that fine, fine “hot reload” functionality. If it goes well, we may see it working with .NET Core and Blazor as well.

ASP.NET Core topped the TechEmpower performance charts for plaintext responses per second.

The .NET Foundation announced their 2020 election this week.

Community roundup

From Microsoft

Blog posts

Podcasts/videos

New subscribers and feedback

Has this email been forwarded to you? Welcome! I’d love for you to subscribe and join the community. I promise to guard your email address with my life.

I would love to hear any feedback you have for The .NET Stacks! My goal is to make this the one-stop shop for weekly updates on developing in the .NET ecosystem, so I look forward to any feedback you can provide. You can directly reply to this email, or talk to me on Twitter as well. See you next week!