public IServiceProvider ConfigureServices(IServiceCollection services) { var connection = Configuration.GetConnectionString("DefaultConnection"); services.AddDbContext <PictureContext>(options => options.UseSqlServer(connection)); services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); services.AddSpaStaticFiles(configuration => { configuration.RootPath = "ClientApp/dist"; }); services.AddTransient <IFileService, FileService>(); return(AutoConfig.ConfigureContainer(services)); }