Category: C#

Content relating to general C# development using the .NET / .NET Framework.

webTiger Logo Wide
  • Using Refit in .NET

    .NET Core

    Refit is a great little library for simplifying consumption of REST Web APIs, that even allows authentication via support for HTTP authorization header injection in Refit’s settings during set up.

    (more…)
  • .NET Blazor Performance Recommendations

    Blazor Logo

    Blazor is a .NET-based Component Architecture platform that is offered as a potential alternative to other modern frameworks such as Angular or ReactJS for responsive web development.

    If you are familiar with other Component Architecture frameworks and are also a .NET developer then moving to Blazor should be fairly straightforward. But, there are some caveats and design constraints you should consider in Blazor that you might not worry about in other frameworks.

    (more…)
  • Injecting Claims into the ASP.NET Core Auth Pipeline

    Padlock

    Most modern cloud authentication providers (i.e. Microsoft Entra ID, Auth0, Okta, etc.) provide a claims-based user management capability. A user can be assigned roles and permissions and these are surfaced in .NET’s user identity classes as ‘claims’.

    Although, most of the time, claims can be configured and managed in the identity provider’s management console there may be times when you want to inject additional claims, and this article discusses how that can be done.

    (more…)
  • Sending Emails Using Microsoft Graph

    Microsoft Graph

    With Microsoft iminently shuttering the capability to send emails programmatically via MS Exchange in Azure, developers need to switch to a mechanism that will be supported moving forwards. Enter Microsoft Graph. This article describes how the MS Graph API can be leveraged to replace MS Exchange based mailing for the programmatic sending of emails.

    (more…)
  • Implementing the Respository Pattern with Entity Framework and LINQ Expressions

    .NET LINQ

    When working with layers of abstraction, especially in modern design structures like Clean Architecture, it can easily become complicated getting a simple database query from the UI to the physcial database provider being queried due to all the abstraction and indirection. An obvious way of abstracting an application from any single underlying data provider is by implementing the Repository pattern.

    (more…)
  • Reloading Workflows With VB Expressions In A WCF Host

    Workflow

    Loading (well, reloading) workflows that include Visual Basic expressions in a WCF hosted service is not as straightforward as one might expect. If you have created your XAML workflow based on an ActivityBuilder or a DynamicActivity then the Visual Basic settings aren’t configured automatically.

    (more…)
  • Serialising and De-Serialising Workflows (in Windows Workflow 4)

    Workflow

    There may be occasions when you’ll want to save the XAML version of a workflow (root activity) while persisting it. In my case this is normally to ensure that when I persist a workflow and later want to reload it, I’ve got the exact workflow structure I started with. This article discusses how to do just that.

    (more…)
  • Adding Expression Editor Auto-Completion To A Re-Hosted Workflow Designer

    Workflow

    One of the clear advantages of using Visual Studio for editing workflows over a custom implementation is the readily available auto-completion features of the IDE. A similar style of auto-completion can be added to your re-hosted workflow designer by implementing your own ‘editor service’ and publishing it to the workflow designer control.

    (more…)
  • Loading Assemblies in a Re-Hosted Workflow Designer

    Workflow

    The basic re-hosted workflow designer solution described in re-hosting the workflow designer article provides a baseline for a bespoke application that can be used for designing workflows, but without some further enhancements it is quite limited. By default it will only allow you to create and edit workflows that use the Framework’s built-in set of activities.

    (more…)
  • Adding Visual Debugging to a Re-Hosted Workflow Designer

    Workflow

    The basic re-hosted workflow designer solution described in this article provides a baseline for a bespoke application that can be used for designing workflows, but without some further enhancements it is quite limited. A relatively straightforward addition to a re-hosted workflow designer is visual debugging.

    (more…)