[WIP] embed code generation

This commit is contained in:
2019-01-08 15:00:58 +00:00
parent 67ff158741
commit 89b75036f9
11 changed files with 303 additions and 37 deletions

View File

@ -0,0 +1,30 @@
using System;
using Microsoft.Extensions.CodeGenerators.Mvc.Controller;
namespace cli.Services
{
public class MvcGenerator : CommandLineGenerator
{
CommandLineGeneratorModel _model;
public MvcGenerator (IServiceProvider services): base (services)
{
_model = new CommandLineGeneratorModel();
}
public async void Generate(
string modelClass,
string ns,
string dbContextFullName,
string controllerName,
string relativeFolderPath
)
{
_model.ControllerName = controllerName;
_model.ModelClass = modelClass;
_model.DataContextClass = dbContextFullName;
_model.RelativeFolderPath = relativeFolderPath;
await GenerateCode(_model);
}
}
}