Skip to main content
All docs
V22.1

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Add a Web API Project to an Existing Solution

This topic contains step-by-step instructions on how to add a Web API project to a .NET Core application.

  1. Use the Solution Wizard to add a Web API project to your application. Right-click the solution in the Solution Explorer and choose Add DevExpress Item | New Project….

    Solution

  2. Select the .NET Core platform and run the XAF Solution Wizard.

    Tutorial launch Wizard

  3. Choose the ASP.NET Core Web API Service option and specify the project name.

    Tutorial launch Wizard

  4. Select the eXpress Persistent Objects or Entity Framework Core ORM for your application and click Next.

    Select ORM

  5. Optional. Choose the security options for your application and click Finish. See the following topic for details: Authentication in Web API projects.

    Select authentication

    The wizard adds the Web API project to your application.

    If you use the Sha512 algorithm to encrypt passwords in your application, set the PasswordCryptographer.SupportLegacySha512 property to true in the Web API project Startup.cs file for backward compatibility:

    File: MySolution.WebApi\Startup.cs

    public class Startup {
        // ...
        public void ConfigureServices(IServiceCollection services) {
            // ...
            PasswordCryptographer.SupportLegacySha512 = true;
            // ...
        }
    }
    
  6. Create endpoints and test the Web API.

See Also