All docs
V21.2
21.2
21.1
The page you are viewing does not exist in version 21.1.
20.2
The page you are viewing does not exist in version 20.2.
20.1
The page you are viewing does not exist in version 20.1.
19.2
The page you are viewing does not exist in version 19.2.
19.1
The page you are viewing does not exist in version 19.1.
18.2
The page you are viewing does not exist in version 18.2.
18.1
The page you are viewing does not exist in version 18.1.
17.2
The page you are viewing does not exist in version 17.2.

Add a Web API Project to an Existing Solution (CTP)

  • 2 minutes to read

Important

We do not recommend that you use the Web API in production code. We made this service available to gather feedback from anyone who considers it for future use.

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 ORM for your application and click Next. The current Web API version does not support Entity Framework Core.

    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