Exemplo n.º 1
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            GlobalConfiguration.Configure(WebApiConfig.Register);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            //Database.SetInitializer<Context>(null);

            DtoMapperConfig.CreateMaps();
            IocConfig.RegisterDependencyResolver(GlobalConfiguration.Configuration);
        }
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            Database.SetInitializer <Context>(null);
            IocConfig.RegisterDependencyResolver(GlobalConfiguration.Configuration);
            Mapper.Initialize(c =>
            {
                c.CreateMap <EmployeeDto, Employee>();
                c.CreateMap <Employee, EmployeeDto>();
            }
                              );
        }