Пример #1
0
        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");
        }
Пример #2
0
        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;
        }
Пример #3
0
        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);
        }
Пример #4
0
        public override bool Execute(Input input)
        {
            _maker.Entity(input.Name);

            return(true);
        }