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
modelAnalyzerIEfModelAnalyzerThe 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
pathstringThe file path to the DbContext class.
contextNamestringThe 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.