ConventionSetBuilder.Replace<TImplementation> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Replaces an existing convention with a derived convention. Also registers the new convention for any convention types not implemented by the existing convention.
public virtual void Replace<TImplementation> (Func<IServiceProvider,TImplementation> conventionFactory) where TImplementation : Microsoft.EntityFrameworkCore.Metadata.Conventions.IConvention;
abstract member Replace : Func<IServiceProvider, 'Implementation (requires 'Implementation :> Microsoft.EntityFrameworkCore.Metadata.Conventions.IConvention)> -> unit (requires 'Implementation :> Microsoft.EntityFrameworkCore.Metadata.Conventions.IConvention)
override this.Replace : Func<IServiceProvider, 'Implementation (requires 'Implementation :> Microsoft.EntityFrameworkCore.Metadata.Conventions.IConvention)> -> unit (requires 'Implementation :> Microsoft.EntityFrameworkCore.Metadata.Conventions.IConvention)
Public Overridable Sub Replace(Of TImplementation As IConvention) (conventionFactory As Func(Of IServiceProvider, TImplementation))
Type Parameters
- TImplementation
The type of the old convention.
Parameters
- conventionFactory
- Func<IServiceProvider,TImplementation>
The factory that creates the new convention.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Entity Framework