Share via


CSharpSnapshotGenerator Class

Definition

Used to generate C# code for creating an IModel.

public class CSharpSnapshotGenerator
public class CSharpSnapshotGenerator : Microsoft.EntityFrameworkCore.Migrations.Design.ICSharpSnapshotGenerator
type CSharpSnapshotGenerator = class
type CSharpSnapshotGenerator = class
    interface ICSharpSnapshotGenerator
Public Class CSharpSnapshotGenerator
Public Class CSharpSnapshotGenerator
Implements ICSharpSnapshotGenerator
Inheritance
CSharpSnapshotGenerator
Implements

Remarks

See Database migrations, and EF Core design-time services for more information and examples.

Constructors

CSharpSnapshotGenerator(CSharpHelper)
CSharpSnapshotGenerator(CSharpSnapshotGeneratorDependencies)

Initializes a new instance of the CSharpSnapshotGenerator class.

Properties

Dependencies

Dependencies for this service.

Methods

Generate(String, IModel, IndentedStringBuilder)

Generates code for creating an IModel.

Generate(String, IModel, IndentedStringBuilder)

Generates code for creating an IModel.

GenerateAnnotation(IAnnotation, IndentedStringBuilder)

Generates code for an annotation which does not have a fluent API call.

GenerateAnnotation(IAnnotation, IndentedStringBuilder)

Generates code for an annotation.

GenerateAnnotations(IEnumerable<IAnnotation>, IndentedStringBuilder)

Generates code for annotations.

GenerateAnnotations(IReadOnlyList<IAnnotation>, IndentedStringBuilder)

Generates code for annotations.

GenerateBaseType(IEntityType, IndentedStringBuilder)
GenerateBaseType(String, IEntityType, IndentedStringBuilder)

Generates code for the base type of an IEntityType.

GenerateBaseType(String, IEntityType, IndentedStringBuilder)

Generates code for the base type of an IEntityType.

GenerateCheckConstraint(String, ICheckConstraint, IndentedStringBuilder)

Generates code for an ICheckConstraint.

GenerateCheckConstraint(String, ICheckConstraint, IndentedStringBuilder)

Generates code for an ICheckConstraint.

GenerateCheckConstraintAnnotations(ICheckConstraint, IndentedStringBuilder)

Generates code for check constraint annotations.

GenerateCheckConstraints(String, IEntityType, IndentedStringBuilder)

Generates code for ICheckConstraint objects.

GenerateCheckConstraints(String, IEntityType, IndentedStringBuilder)

Generates code for ICheckConstraint objects.

GenerateComplexProperties(String, IEnumerable<IComplexProperty>, IndentedStringBuilder)

Generates code for IComplexProperty objects.

GenerateComplexProperty(String, IComplexProperty, IndentedStringBuilder)

Generates code for an IComplexProperty.

GenerateComplexPropertyAnnotations(String, IComplexProperty, IndentedStringBuilder)

Generates code for the annotations on an IProperty.

GenerateData(String, IEnumerable<IProperty>, IEnumerable<IDictionary<String,Object>>, IndentedStringBuilder)

Generates code for data seeding.

GenerateData(String, IEnumerable<IProperty>, IEnumerable<IDictionary<String,Object>>, IndentedStringBuilder)

Generates code for data seeding.

GenerateEntityType(String, IEntityType, IndentedStringBuilder)

Generates code for an IEntityType.

GenerateEntityType(String, IEntityType, IndentedStringBuilder)

Generates code for an IEntityType.

GenerateEntityTypeAnnotations(IEntityType, IndentedStringBuilder)
GenerateEntityTypeAnnotations(String, IEntityType, IndentedStringBuilder)

Generates code for the annotations on an entity type.

GenerateEntityTypeAnnotations(String, IEntityType, IndentedStringBuilder)

Generates code for the annotations on an entity type.

GenerateEntityTypeMappingFragmentAnnotations(String, IEntityTypeMappingFragment, IndentedStringBuilder)

Generates code for mapping fragment annotations.

GenerateEntityTypeNavigations(String, IEntityType, IndentedStringBuilder)

Generates code for the navigations of an IEntityType.

GenerateEntityTypeRelationships(String, IEntityType, IndentedStringBuilder)

Generates code for the relationships of an IEntityType.

GenerateEntityTypeRelationships(String, IEntityType, IndentedStringBuilder)

Generates code for the relationships of an IEntityType.

GenerateEntityTypes(String, IEnumerable<IEntityType>, IndentedStringBuilder)

Generates code for IEntityType objects.

GenerateEntityTypes(String, IReadOnlyList<IEntityType>, IndentedStringBuilder)

Generates code for IEntityType objects.

GenerateEntityTypes(String, IReadOnlyList<IEntityType>, IndentedStringBuilder)

Generates code for IEntityType objects.

GenerateFluentApiForAnnotation(List<IAnnotation>, String, Func<IAnnotation,Object>, String, IndentedStringBuilder)

Generates a Fluent API calls for an annotation.

GenerateFluentApiForAnnotation(List<IAnnotation>, String, String, IndentedStringBuilder)

Generates a Fluent API calls for an annotation.

GenerateForeignKey(IForeignKey, IndentedStringBuilder)
GenerateForeignKey(String, IForeignKey, IndentedStringBuilder)

Generates code for an IForeignKey.

GenerateForeignKey(String, IForeignKey, IndentedStringBuilder)

Generates code for an IForeignKey.

GenerateForeignKeyAnnotations(IForeignKey, IndentedStringBuilder)

Generates code for the annotations on a foreign key.

GenerateForeignKeyAnnotations(IForeignKey, IndentedStringBuilder)

Generates code for the annotations on a foreign key.

GenerateForeignKeyAnnotations(String, IForeignKey, IndentedStringBuilder)

Generates code for the annotations on a foreign key.

GenerateForeignKeys(IEnumerable<IForeignKey>, IndentedStringBuilder)
GenerateForeignKeys(String, IEnumerable<IForeignKey>, IndentedStringBuilder)

Generates code for IForeignKey objects.

GenerateForeignKeys(String, IEnumerable<IForeignKey>, IndentedStringBuilder)

Generates code for IForeignKey objects.

GenerateIndex(IIndex, IndentedStringBuilder)
GenerateIndex(String, IIndex, IndentedStringBuilder)

Generates code an IIndex.

GenerateIndex(String, IIndex, IndentedStringBuilder)

Generates code an IIndex.

GenerateIndexAnnotations(IIndex, IndentedStringBuilder)

Generates code for the annotations on an index.

GenerateIndexAnnotations(String, IIndex, IndentedStringBuilder)

Generates code for the annotations on an index.

GenerateIndexes(IEnumerable<IIndex>, IndentedStringBuilder)
GenerateIndexes(String, IEnumerable<IIndex>, IndentedStringBuilder)

Generates code for IIndex objects.

GenerateIndexes(String, IEnumerable<IIndex>, IndentedStringBuilder)

Generates code for IIndex objects.

GenerateKey(IKey, IndentedStringBuilder, Boolean)
GenerateKey(String, IKey, IndentedStringBuilder, Boolean)

Generates code for an IKey.

GenerateKey(String, IKey, IndentedStringBuilder, Boolean)

Generates code for an IKey.

GenerateKeyAnnotations(IKey, IndentedStringBuilder)

Generates code for the annotations on a key.

GenerateKeyAnnotations(String, IKey, IndentedStringBuilder)

Generates code for the annotations on a key.

GenerateKeys(IEnumerable<IKey>, IKey, IndentedStringBuilder)
GenerateKeys(String, IEnumerable<IKey>, IKey, IndentedStringBuilder)

Generates code for IKey objects.

GenerateKeys(String, IEnumerable<IKey>, IKey, IndentedStringBuilder)

Generates code for IKey objects.

GenerateNavigation(String, INavigation, IndentedStringBuilder)

Generates code for an INavigation.

GenerateNavigationAnnotations(INavigation, IndentedStringBuilder)

Generates code for the annotations on a navigation.

GenerateNavigationAnnotations(String, INavigation, IndentedStringBuilder)

Generates code for the annotations on a navigation.

GenerateNavigations(String, IEnumerable<INavigation>, IndentedStringBuilder)

Generates code for INavigation objects.

GenerateOwnedType(String, IForeignKey, IndentedStringBuilder)

Generates code for an owned entity types.

GenerateOwnedType(String, IForeignKey, IndentedStringBuilder)

Generates code for an owned entity types.

GenerateOwnedTypes(String, IEnumerable<IForeignKey>, IndentedStringBuilder)

Generates code for owned entity types.

GenerateOwnedTypes(String, IEnumerable<IForeignKey>, IndentedStringBuilder)

Generates code for owned entity types.

GenerateProperties(IEnumerable<IProperty>, IndentedStringBuilder)
GenerateProperties(String, IEnumerable<IProperty>, IndentedStringBuilder)

Generates code for IProperty objects.

GenerateProperties(String, IEnumerable<IProperty>, IndentedStringBuilder)

Generates code for IProperty objects.

GenerateProperty(IProperty, IndentedStringBuilder)
GenerateProperty(String, IProperty, IndentedStringBuilder)

Generates code for an IProperty.

GenerateProperty(String, IProperty, IndentedStringBuilder)

Generates code for an IProperty.

GeneratePropertyAnnotations(IProperty, IndentedStringBuilder)

Generates code for the annotations on an IProperty.

GeneratePropertyAnnotations(IProperty, IndentedStringBuilder)

Generates code for the annotations on an IProperty.

GeneratePropertyAnnotations(String, IProperty, IndentedStringBuilder)

Generates code for the annotations on an IProperty.

GeneratePropertyOverride(String, IRelationalPropertyOverrides, IndentedStringBuilder)

Generates code for an IRelationalPropertyOverrides.

GeneratePropertyOverrides(String, IEntityType, StoreObjectIdentifier, IndentedStringBuilder)

Generates code for IRelationalPropertyOverrides objects.

GeneratePropertyOverridesAnnotations(String, IRelationalPropertyOverrides, IndentedStringBuilder)

Generates code for property overrides annotations.

GenerateRelationships(String, IEntityType, IndentedStringBuilder)

Generates code for the relationships of an IEntityType.

GenerateRelationships(String, IEntityType, IndentedStringBuilder)

Generates code for the relationships of an IEntityType.

GenerateSequence(String, ISequence, IndentedStringBuilder)

Generates code for an ISequence.

GenerateSequenceAnnotations(String, ISequence, IndentedStringBuilder)

Generates code for sequence annotations.

GenerateTrigger(String, ITrigger, IndentedStringBuilder)

Generates code for an ITrigger.

GenerateTriggerAnnotations(String, ITrigger, IndentedStringBuilder)

Generates code for trigger annotations.

GenerateTriggers(String, IEntityType, String, String, IndentedStringBuilder)

Generates code for ITrigger objects.

IgnoreAnnotations(IList<IAnnotation>, String[])

Removes ignored annotations.

IgnoreAnnotationTypes(IList<IAnnotation>, String[])

Removes ignored annotations.

Applies to