Working example of calling the WeatherKit REST API in C#/.NET.
Continue readingTag: .NET
Including a Hidden Folder in ASP.NET Publish
Ever want to include a hidden folder and files in your publish output from an ASP.NET project? It's something you might have to do for files you need to place in a folder like .well-known. It's actually pretty easy to include hidden folders in publish, but there's no way to do it in the UI that I'm aware of. Here's how you do it.
Continue readingASP.NET MongoDB Example
Here's a working example of using MongoDB with ASP.NET / C# that demonstrates all the basic operations in MongoDB and encapsulates them in Web API. The example application is a simple Todo list. It's pretty simplistic, but it's more or less the pattern I'm using right now for data access against MongoDB.
Continue readingAdding Image Watermark Text in C# with ImageSharp
There may be times you want to add a watermark, or a bit of text, to an image programmatically. Here's how to do that with ImageSharp. As of the this writing, it requires a couple pre-release NuGet packages, but the ImageSharp libraries seem to work pretty well for at least basic use.
Here's some example code to load an image and draw some watermark text on it.
Continue readingMapKit JS with ASP.NET Core
Apple's MapKit JS isn't currently as widely used as some alternative web mapping solutions, but it's a reasonable option, depending on your needs. While there's no free version, the usage limits are very high, and it's priced more competitively than many rivals, since it's included with an Apple Developer Membership. Integrating MapKit JS with an ASP.NET Core application is a little different at first, if you've never worked with JWT, but it's actually pretty straightforward.
Continue reading