You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var mvc = services.AddMvc(options =>
{
options.Filters.Add(...);
})
mvc.AddXmlDataContractSerializerFormatters()
mvc.AddViewLocalization(LanguageViewLocationExpanderFormat.SubFolder);
The purpose of this change (beyond consistency) is to make the intellisense experience more targeted. Now MVC methods that require you to register MVC can't be called without doing so. Also MVC's various features are more discoverable if you're looking at intellisense for the builder.
Part 2:
We removed additional extension methods that we had off of IServiceCollection or MvcOptions and made them into extensions methods targeting one of the MVC builders (IMvcCoreBuilder or IMvcBuilder).
For beta7 we've changed MVC's startup code APIs to be more consistent with EntityFramework and Identity.
Part 1:
Both the
AddMvc(...)
andAddMvcCore(...)
extension methods now return a builder API, which can be chained to additional setup methods:Or used as local variable:
The purpose of this change (beyond consistency) is to make the intellisense experience more targeted. Now MVC methods that require you to register MVC can't be called without doing so. Also MVC's various features are more discoverable if you're looking at intellisense for the builder.
Part 2:
We removed additional extension methods that we had off of
IServiceCollection
orMvcOptions
and made them into extensions methods targeting one of the MVC builders (IMvcCoreBuilder
orIMvcBuilder
).Old:
New:
Part 3:
We removed variations on
ConfigureMvcXyz(...)
and replaced them with extension methods targeting one of the builders.All of our
AddXyzFeature(...)
methods that have an associated options type, we provide an overload that takes anAction<T>
for configuring options.Where there's no obvious
AddXyzFeature(...)
we provide anAddXyzOptions(...)
method instead.Old:
New:
The text was updated successfully, but these errors were encountered: