Select theme:

Material 3
warning

You are viewing the legacy Radzen documentation.

Radzen Blazor Studio has replaced Radzen as the primary RAD tool for Blazor applications.

Radzen Blazor Studio offers a modern UI, enhanced features, and improved performance to streamline your development process.

The latest documentation for Radzen Blazor Studio is available here: https://www.radzen.com/blazor-studio/documentation/

Open Radzen Blazor Studio docs

Extend application user | Blazor (Blazor)link

Add ApplicationUser partial classlink

  1. Open the solution that Radzen has generated with Visual Studio (or the server directory with Visual Studio Code).
  2. Go to the server\Authentication directory.
  3. Add a new file server\Models\ApplicationUser.Custom.cs with the following content.
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Runtime.Serialization;
    using Microsoft.AspNetCore.Identity;
    using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
    
    // Replace [ApplicationName] with the namespace of your Radzen application.
    namespace [ApplicationName].Models
    {
        public partial class ApplicationUser
        {
            public string Country { get; set; }
        }
    }
    
  4. Open the server directory in a terminal.
  5. Run dotnet ef migrations add Country -c ApplicationIdentityDbContext. This will create an Entity Framework Core migration which at runtime will add a Country column to the AspNetUsers table. It will store the Country property values.

If you haven't installed the EF Core tools before that command will fail. Run dotnet tool install --global dotnet-ef to install them.

Extend the user management pageslink

In order to capture the values of the custom properties created in the previous step you have to update the user management pages.

Check the related article from our CRM application tutorial.

© 2016-2025 Radzen Ltd. All Rights Reserved.
Designed and developed with ❤️ in Radzen Blazor Studio.

Select theme:

Material 3