Files
Backend-Api/ServiceHost/Test/Tester.cs
2025-05-20 16:54:48 +03:30

38 lines
1.2 KiB
C#

using System.Diagnostics;
using CompanyManagment.App.Contracts.AdminMonthlyOverview;
using CompanyManagment.EFCore;
using ServiceHost.Areas.AdminNew.Pages.Company.RollCall;
namespace ServiceHost.Test;
public class Tester
{
private readonly IAdminMonthlyOverviewApplication _adminMonthlyOverviewApplication;
private readonly CompanyContext _companyContext;
public Tester(IAdminMonthlyOverviewApplication adminMonthlyOverviewApplication, CompanyContext companyContext)
{
_adminMonthlyOverviewApplication = adminMonthlyOverviewApplication;
_companyContext = companyContext;
}
public async Task Test()
{
// await AdminMonthlyOverviewTest();
}
private async Task AdminMonthlyOverviewTest()
{
var acc = _companyContext.WorkshopAccounts.FirstOrDefault(x => x.AccountId == 322);
var searchModel = new AdminMonthlyOverviewSearchModel()
{
Year = 1403,
Month = 12,
AdminAccountId = 322
};
var stopwatch = new Stopwatch();
stopwatch.Start();
var workshopsStatus = await _adminMonthlyOverviewApplication.GetWorkshopListByStatus(searchModel);
Console.WriteLine(stopwatch.Elapsed);
}
}