Table of Contents

Class AnalyzeContextUseCase

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

Use case for analyzing a specified DbContext class.

public class AnalyzeContextUseCase
Inheritance
AnalyzeContextUseCase
Inherited Members

Constructors

AnalyzeContextUseCase(IEfModelAnalyzer)

Use case for analyzing a specified DbContext class.

public AnalyzeContextUseCase(IEfModelAnalyzer modelAnalyzer)

Parameters

modelAnalyzer IEfModelAnalyzer

The EF model analyzer used for context analysis.

Methods

ExecuteAsync(string, string?)

Executes the analysis of a specified DbContext class.

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

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.

Exceptions

ArgumentException

Thrown when the provided file path is not a .cs file.