Ejemplo n.º 1
0
        public void ResolveTest()
        {
            // arrange
            var solutions = new string[] { @".\Stubs\TestSolution\Test.sln" };

            // act
            var types = _target.GetDbContextTypes(solutions);

            // assert
            Assert.NotEmpty(types);
        }
Ejemplo n.º 2
0
        public string Run()
        {
            var solutions = this.dir.GetFilesPath("*.sln");
            var types     = resolver.GetDbContextTypes(solutions);

            foreach (var type in types)
            {
                var efdiagramModel = parser.GetResult(type.Name, ActivatorExtensions.CrteateDbContext(type));
                var generated      = this.generator.GetResult(efdiagramModel);
                if (!string.IsNullOrEmpty(generated.Content))
                {
                    return(generated.Content);
                }
            }
            return("Nothing generated.");
        }