public static void Register(IServiceCollection services) { RepositoryServices.Register(services); MapperServices.Register(services); ApplicationServices.Register(services); IdentityConfiguration.Register(services); }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { IdentityConfiguration.Register(services); services.AddDbContext <ExchangeDbContext>(options => options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection"))); services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); // In production, the Angular files will be served from this directory services.AddSpaStaticFiles(configuration => { configuration.RootPath = "ClientApp/dist"; }); }