Table of Contents

Interface IEfAnalysisService

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

Defines the interface for analyzing Entity Framework contexts and models.

public interface IEfAnalysisService

Methods

AnalyzeContextAsync(string, string?)

Analyzes the specified Entity Framework context and retrieves its model.

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

Parameters

path string

The file path to the project or solution containing the context.

contextName string

The name of the context to analyze. If null, the default context is analyzed.

Returns

Task<EfModel>

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

AnalyzeSnapshotAsync(string, string?)

Analyzes the specified Entity Framework model snapshot and retrieves its model.

Task<EfModel> AnalyzeSnapshotAsync(string path, string? snapshotName = null)

Parameters

path string

The file path to the C# file containing the model snapshot.

snapshotName string

The name of the snapshot to analyze. If null, the first snapshot found in the file is analyzed.

Returns

Task<EfModel>

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

DiscoverContextsAsync(string)

Discovers all Entity Framework contexts in the specified path.

Task<List<string>> DiscoverContextsAsync(string path)

Parameters

path string

The file path to search for Entity Framework contexts.

Returns

Task<List<string>>

A task that represents the asynchronous operation. The task result contains a list of discovered context names.

DiscoverSnapshotsAsync(string)

Discovers all Entity Framework model snapshots in the specified path.

Task<List<string>> DiscoverSnapshotsAsync(string path)

Parameters

path string

The file path to search for Entity Framework model snapshots.

Returns

Task<List<string>>

A task that represents the asynchronous operation. The task result contains a list of discovered snapshot names.