public static void AddAutoMapperSetup(this IServiceCollection services) { if (services == null) { throw new ArgumentNullException(nameof(services)); } services.AddAutoMapper(); MappingsConfig.RegisterMappings(); }
protected void Application_Start() { GlobalConfiguration.Configure(WebApiConfig.Register); WebSecurity.InitializeDatabaseConnection("SDCConnectionString", "UserProfile", "UserId", "UserName", autoCreateTables: true); AreaRegistration.RegisterAllAreas(); RouteConfig.RegisterRoutes(RouteTable.Routes); GlobalFilters.Filters.Add(new SDCAuthorizationFilterAttribute()); MappingsConfig.RegisterMappings(); SDCWebApp.Kernel = new StandardKernel(new SDCModule()); }