ApiControllerGenerator

Syntax

public class ApiControllerGenerator : ContainerGeneratorBase, IDisposable

Inheritance

Implements

Constructors

ApiControllerGenerator

public ApiControllerGenerator(List<string> extraUsings, string controllerNamespace, EntityContainer container, bool isEFCore, bool addInheritance = true, string baseClass = null)
Initializes a new instance of the ApiControllerGenerator class.

Parameters

  • extraUsings List<string>: Additional using statements to include.
  • controllerNamespace string: The namespace for the generated controller.
  • container EntityContainer: The EntityContainer to generate the controller for.
  • isEFCore bool: Whether the target is Entity Framework Core.
  • addInheritance bool: Whether to include inheritance in the class declaration.
  • baseClass string: The name of the base class to inherit from.

Methods

Generate

public override void Generate()

WriteFile

public string WriteFile(string directory = null)

Parameters

Returns

string