public void Make_entity() { var m = new Maker(new MiruSolution(_solutionDir)); m.Entity("Topup"); (_solutionDir / "src" / "Mong" / "Domain" / "Topup.cs") .ShouldExistAndContains( "public class Topup : Entity"); (_solutionDir / "tests" / "Mong.Tests" / "Domain" / "TopupTest.cs") .ShouldExistAndContains( "public class TopupTest : DomainTest"); }
public async Task Execute() { Console2.BreakLine(); _maker.Entity(Name); Console2.BreakLine(); Console2.GreyLine("\tConsider adding to your DbContext:"); Console2.BreakLine(); Console2.WhiteLine($"\t\tpublic DbSet<{Name}> {Name.Pluralize()} {{ get; set; }}"); await Task.CompletedTask; }
public override bool Execute(Input input) { Console2.BreakLine(); _maker.Entity(input.Name); Console2.BreakLine(); Console2.GreyLine("\tConsider adding to your DbContext:"); Console2.BreakLine(); Console2.WhiteLine($"\t\tpublic DbSet<{input.Name}> {input.Name.Pluralize()} {{ get; set; }}"); return(true); }
public override bool Execute(Input input) { _maker.Entity(input.Name); return(true); }