WebExtensions.UseCoreIntegrated(this MvcOptions options) Method
.NET Standard 2.x
Enables the actions in the controller to support the parameters of the type IDataUnpacker
, IModelEntry<T>
and IEnumerable<IModelEntry<T>>
.
Namespace: SnapObjects.Data.AspNetCore
Assembly: SnapObjects.Data.AspNetCore.dll
Syntax
public static MvcOptions UseCoreIntegrated(this MvcOptions options);
Parameters
options
MvcOptions
The MvcOptions
object which provides programmatic configuration for the MVC framework.
Returns
Microsoft.AspNetCore.Mvc.MvcOptions
Returns the MvcOptions
object.
Examples
The following code demonstrates how to use the UseCoreIntegrated
method in the ConfigureServices
method of the Startup
class.
using SnapObjects.Data.AspNetCore;
using Microsoft.Extensions.DependencyInjection;
namespace Appeon.ApiDoc.WebExtensionsExamples
{
public class Startup_UseCoreIntegratedExample
{
// Uses this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc(m =>
{
// Makes the actions in the controller support the parameters of the
// type IDataUnpacker, IModelEntry<T>.
m.UseCoreIntegrated();
});
}
}
}
Applies to
.NET Standard
2.x