Table of Contents

Class ModelSnapshotParser

Namespace
ProjGraph.Lib.EntityFramework.Infrastructure
Assembly
ProjGraph.Lib.EntityFramework.dll

Parser for Entity Framework ModelSnapshot files: locates the snapshot's BuildModel method and folds its fluent configuration into an EfModel via the Roslyn syntax walkers (ProjGraph.Lib.EntityFramework.Infrastructure.FluentEntityWalker, ProjGraph.Lib.EntityFramework.Infrastructure.FluentPropertyWalker, ProjGraph.Lib.EntityFramework.Infrastructure.FluentRelationshipWalker).

public static class ModelSnapshotParser
Inheritance
ModelSnapshotParser
Inherited Members

Methods

Parse(ClassDeclarationSyntax, INamedTypeSymbol, Compilation)

Parses a ModelSnapshot class to extract the Entity Framework model.

public static EfModel Parse(ClassDeclarationSyntax snapshotClass, INamedTypeSymbol snapshotType, Compilation compilation)

Parameters

snapshotClass ClassDeclarationSyntax

The ClassDeclarationSyntax representing the ModelSnapshot class.

snapshotType INamedTypeSymbol

The INamedTypeSymbol representing the type of the ModelSnapshot class.

compilation Compilation

The Compilation object used for Roslyn analysis.

Returns

EfModel

An EfModel object representing the parsed Entity Framework model, including its context name and entities.