X

ASP.NET

ASP.NET Core: Building enum provider to convert C# enums to JavaScript

My previous post about ASP.NET Core and getting C# enums to JavaScript was primitive and used simple attribute on enums to detect ones we need in JavaScript. This blog post extends the idea and makes some generalizations to support also those enums that are located in the libraries we don’t control or on what we don’t want to apply attribute.

Global query filters in Entity Framework Core 2.0

Entity Framework Core 2.0 introduces global query filters that can be applied to entities when model is created. It makes it easier to build multi-tenant applications and support soft deleting of entities. This blog post gives deeper overview about how to use global query filters in real-life applications and how to apply global query filters to domain entities automatically. (more…)

Like-operator in Entity Framework Core 2.0

Entity Framework Core 2.0 was announces yesterday and it brings some new and cool features. One of them is SQL Like-operator we can use now using directly in our code. Here is the example of using new Like-operator.

ASP.NET Core: Converting C# enums to JavaScript

In my previous posts about enums I covered how to convert C# enums to JavaScript on classic ASP.NET MVC. This blog post introduces how to do it on ASP.NET Core using simple view component.

Converting System.Drawing.Color to hex

One quick code note to make during building my Azure Cognitive Services demo application. I needed a way how to convert colors of System.Drawing to hex strings that I can use in views. Here is my simple and elegant solution.

Converting multiple C# enums to JavaScript

My last solution to turn C# enums to JavaScript was simple but needed some additional work to support multiple enums better. After some playing with different approaches I found simple one that works okay for me. This blog post describes my simple solution that turns multiple C# enums to JavaScript with one shot.

Identifying people on photos using Azure Cognitive Services

My previous post about Azure Cognitive Services described how to detect faces on photos. In this post I will focus on identifying people on photos. This post is based on my Azure Cognitive Services sample application that has most of Face API support implemented and the goal is to describe identifying process in brief and also show some code I have written.

ASP.NET Core: Converting C# enums to JavaScript

In one of my project I need some enums defined in C# to able also for JavaScript code. After some quick research in internet I came out with simple and easy extension method to convert C# enums to JavaScript.

Running PHP applications on .NET Core

Ever wondered about mixing up simplicity and flexibility of PHP with power and performance of .NET Core? The solution is coming and it is called Peachpie, the successor of Phalanger. This blog posts introduces Peachpie - the tool to compile PHP code to .NET Core - and helps to get started with it. (more…)

Faking Azure AD identity in ASP.NET Core unit tests

When testing ASP.NET Core controllers in application that uses Azure AD we need usually current user at least for some tests. As there is no authenticated user when unit testing, we need to create one by our own. This blog post shows how to create claims identity for ASP.NET Core unit tests.