Skip to main content
A newer version of this page is available. .
All docs
V21.2
.NET 5.0+
  • The page you are viewing does not exist in the .NET Framework 4.5.2+ platform documentation. This link will take you to the parent topic of the current section.
  • The page you are viewing does not exist in the .NET Standard 2.0+ platform documentation. This link will take you to the parent topic of the current section.

WebApiOptions.BusinessObject<T>() Method

Generates HTTP endpoints for the business object class passed as a parameter.

Namespace: DevExpress.ExpressApp.WebApi.Services

Assembly: DevExpress.ExpressApp.WebApi.v21.2.dll

NuGet Package: DevExpress.ExpressApp.WebApi

Declaration

public void BusinessObject<T>()
    where T : class

Type Parameters

Name Description
T

The business object class for which the Web API Service generates HTTP endpoints.

Remarks

The following code creates endpoints for the ApplicationUser and Contact business objects:

File: MySolution.WebApi\Startup.cs (MySolution.Blazor.Server\Startup.cs)

using MySolution.Module.BusinessObjects;
// ...
namespace MySolution.WebApi {
    public class Startup {
        // ...
        public void ConfigureServices(IServiceCollection services) {
            // ...
            services.AddXafWebApi(options => {
                options.BusinessObject<ApplicationUser>();
                options.BusinessObject<Contact>();
            });
            // ...
        }
        // ...    
    }
}
See Also