diff --git a/MoneyMap/Program.cs b/MoneyMap/Program.cs index bf18dfb..266f7bc 100644 --- a/MoneyMap/Program.cs +++ b/MoneyMap/Program.cs @@ -1,7 +1,6 @@ using Microsoft.EntityFrameworkCore; using MoneyMap.Data; -using MoneyMap.Pages; -using MoneyMap.Services; // Add this for the services +using MoneyMap.Services; var builder = WebApplication.CreateBuilder(args); @@ -9,6 +8,9 @@ builder.Services.AddRazorPages(); builder.Services.AddDbContext(options => options.UseSqlServer(builder.Configuration.GetConnectionString("MoneyMapDb"))); +// Add memory cache for services like TransactionCategorizer +builder.Services.AddMemoryCache(); + // Add session support builder.Services.AddDistributedMemoryCache(); builder.Services.AddSession(options => @@ -43,9 +45,16 @@ builder.Services.AddScoped( builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); + +// Receipt services builder.Services.AddScoped(); builder.Services.AddScoped(); -builder.Services.AddHttpClient(); +builder.Services.AddScoped(); + +// AI vision clients +builder.Services.AddHttpClient(); +builder.Services.AddHttpClient(); +builder.Services.AddScoped(); // AI categorization service builder.Services.AddHttpClient();