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.
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….
Select the .NET Core platform and run the XAF Solution Wizard.
Choose the ASP.NET Core Web API Service option and specify the project name.
Select the eXpress Persistent Objects ORM for your application and click Next. The current Web API version does not support Entity Framework Core.
Optional. Choose the security options for your application and click Finish. See the following topic for details: Authentication in Web API projects.
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; // ... } }