Table of Contents

Interface IEfModelAnalyzer

Namespace
ProjGraph.Lib.EntityFramework.Application
Assembly
ProjGraph.Lib.EntityFramework.dll

Interface for advanced analysis of Entity Framework models, including discovery and analysis of DbContext and ModelSnapshot classes.

public interface IEfModelAnalyzer

Methods

AnalyzeContextAsync(string, string?)

Analyzes a DbContext class and its related entity files to extract Entity Framework model information.

Task<EfModel> AnalyzeContextAsync(string path, string? contextName)

Parameters

path string

The file path to the DbContext class.

contextName string

The optional name of the DbContext class to analyze.

Returns

Task<EfModel>

A task that represents the asynchronous operation. The task result contains the analyzed Entity Framework model.

AnalyzeSnapshotAsync(string, string?)

Analyzes a ModelSnapshot class and its related files to extract Entity Framework model information.

Task<EfModel> AnalyzeSnapshotAsync(string snapshotPath, string? snapshotName)

Parameters

snapshotPath string

The file path to the ModelSnapshot class.

snapshotName string

The optional name of the ModelSnapshot class to analyze.

Returns

Task<EfModel>

A task that represents the asynchronous operation. The task result contains the analyzed Entity Framework model.

DiscoverDbContexts(SyntaxNode)

Discovers DbContext classes in a given syntax tree.

IEnumerable<string> DiscoverDbContexts(SyntaxNode root)

Parameters

root SyntaxNode

The root syntax node of the syntax tree to analyze.

Returns

IEnumerable<string>

A collection of strings representing the names of discovered DbContext classes.

DiscoverModelSnapshots(SyntaxNode)

Discovers ModelSnapshot classes in a given syntax tree.

IEnumerable<string> DiscoverModelSnapshots(SyntaxNode root)

Parameters

root SyntaxNode

The root syntax node of the syntax tree to analyze.

Returns

IEnumerable<string>

A collection of strings representing the names of discovered ModelSnapshot classes.