예제 #1
0
 protected void Application_Start()
 {
     AreaRegistration.RegisterAllAreas();
     FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     BundleConfig.RegisterBundles(BundleTable.Bundles);
     HeroicAutoMapperConfigurator.LoadMapsFromCallerAndReferencedAssemblies();
 }
 public static void Configure()
 {
     //NOTE: By default, the current project and all referenced projects will be scanned.
     //		You can customize this by passing in a lambda to filter the assemblies by name,
     //		like so:
     //HeroicAutoMapperConfigurator.LoadMapsFromCallerAndReferencedAssemblies(x => x.Name.StartsWith("YourPrefix"));
     HeroicAutoMapperConfigurator.LoadMapsFromCallerAndReferencedAssemblies();
 }
예제 #3
0
 public static void Configure()
 {
     // NOTE: By default, the current project and all referenced projects will be scanned.
     // You can customize this by passing in a lambda to filter the assemblies by name,
     // like so:
     // HeroicAutoMapperConfigurator.LoadMapsFromCallerAndReferencedAssemblies(x => x.Name.StartsWith("YourPrefix"));
     HeroicAutoMapperConfigurator.LoadMapsFromCallerAndReferencedAssemblies();
     // If you run into issues with the maps not being located at runtime, try using this method instead:
     // HeroicAutoMapperConfigurator.LoadMapsFromAssemblyContainingTypeAndReferencedAssemblies<SomeControllerOrTypeInYourWebProject>();
 }
예제 #4
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            AutofacConfig.Register();

            //https://github.com/MattHoneycutt/HeroicFramework/tree/master/Heroic.AutoMapper
            HeroicAutoMapperConfigurator.LoadMapsFromCallerAndReferencedAssemblies();
        }
예제 #5
0
        private static void Main()
        {
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
            HeroicAutoMapperConfigurator.LoadMapsFromCallerAndReferencedAssemblies();
            _uow = new UnitOfWork(new DataContext());

            var goAgain = true;

            while (goAgain)
            {
                CollectAnswers();
                RunAsync().Wait();
                goAgain = false;
                Console.WriteLine("Finished", Color.Blue);
                Console.WriteLine();
                Console.Write("Continue (Y/N)?: ");
                var answer = Console.ReadLine();
                if (answer.ToLower() == "y")
                {
                    goAgain = true;
                }
            }
            Console.Write("Finished");
        }