Refactor. Add data layer

This commit is contained in:
rossmill76 committed 2026-03-06 11:05:01 +00:00
1 parent 3b7e4e6ec5
commit b6b794f0b4
82 files changed
+2930 -2811

No files matched your search

@@ -1,7 +1,7 @@
using BudgetApp.Data;
using BudgetApp.Data.Entities;
using BudgetApp.Data.Repositories;
using BudgetApp.Services;
using BudgetApp.Tests.Helpers;
using Microsoft.EntityFrameworkCore;
using Xunit;
namespace BudgetApp.Tests.Services;
@@ -181,9 +181,9 @@ public class DashboardServiceTests
}
using var context = factory.CreateContext();
var transactionService = new TransactionService(context);
var accountService = new AccountService(context);
var categoryService = new CategoryService(context);
var transactionService = new TransactionRepository(context);
var accountService = new AccountRepository(context);
var categoryService = new CategoryRepository(context);
var dashboardService = new DashboardService(transactionService, accountService, categoryService);
var result = await dashboardService.GetDashboardDataAsync(TestDbContextFactory.TestUserId);
@@ -214,9 +214,9 @@ public class DashboardServiceTests
}
using var context = factory.CreateContext();
var transactionService = new TransactionService(context);
var accountService = new AccountService(context);
var categoryService = new CategoryService(context);
var transactionService = new TransactionRepository(context);
var accountService = new AccountRepository(context);
var categoryService = new CategoryRepository(context);
var dashboardService = new DashboardService(transactionService, accountService, categoryService);
var result = await dashboardService.GetDashboardDataAsync(TestDbContextFactory.TestUserId);
@@ -243,9 +243,9 @@ public class DashboardServiceTests
}
using var context = factory.CreateContext();
var transactionService = new TransactionService(context);
var accountService = new AccountService(context);
var categoryService = new CategoryService(context);
var transactionService = new TransactionRepository(context);
var accountService = new AccountRepository(context);
var categoryService = new CategoryRepository(context);
var dashboardService = new DashboardService(transactionService, accountService, categoryService);
var from = DateTime.Today.AddDays(-10);