MvcCoreServiceCollectionExtensions Class¶
Extension methods for setting up essential MVC services in an Microsoft.Extensions.DependencyInjection.IServiceCollection.
- Namespace
Microsoft.Extensions.DependencyInjection- Assemblies
- Microsoft.AspNetCore.Mvc.Core
Syntax¶
public class MvcCoreServiceCollectionExtensions
-
class
Microsoft.Extensions.DependencyInjection.MvcCoreServiceCollectionExtensions
Methods¶
-
AddMvcCore(Microsoft.Extensions.DependencyInjection.IServiceCollection)¶ Adds essential MVC services to the specified
Microsoft.Extensions.DependencyInjection.IServiceCollection.Arguments: services (Microsoft.Extensions.DependencyInjection.IServiceCollection) – The Microsoft.Extensions.DependencyInjection.IServiceCollectionto add services to.Return type: Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder Returns: An Microsoft.Extensions.DependencyInjection.IMvcCoreBuilderthat can be used to further configure the MVC services.public static IMvcCoreBuilder AddMvcCore(this IServiceCollection services)
-
AddMvcCore(Microsoft.Extensions.DependencyInjection.IServiceCollection, System.Action<Microsoft.AspNetCore.Mvc.MvcOptions>) Adds essential MVC services to the specified
Microsoft.Extensions.DependencyInjection.IServiceCollection.Arguments: - services (Microsoft.Extensions.DependencyInjection.IServiceCollection) – The
Microsoft.Extensions.DependencyInjection.IServiceCollectionto add services to. - setupAction (System.Action<Microsoft.AspNetCore.Mvc.MvcOptions>) – An
System.Action`1to configure the providedMicrosoft.AspNetCore.Mvc.MvcOptions.
Return type: Returns: An
Microsoft.Extensions.DependencyInjection.IMvcCoreBuilderthat can be used to further configure the MVC services.public static IMvcCoreBuilder AddMvcCore(this IServiceCollection services, Action<MvcOptions> setupAction)
- services (Microsoft.Extensions.DependencyInjection.IServiceCollection) – The
-