Automated Task

公布

Type Scheduled

Date Executed 7/18/2024, 9:00:00 AM

Created 7/17/2024, 3:43:48 PM

Updated 7/17/2024, 3:43:48 PM

Description 公布赛道。

Code
1
using Microsoft.Extensions.Logging;
2
using Microsoft.Extensions.DependencyInjection;
3
using PhiZoneApi.Models;
4
using PhiZoneApi.Enums;
5
using PhiZoneApi.Interfaces;
6

7
var target = (EventDivision)Target;
8
await using (var scope = ServiceProvider.CreateAsyncScope())
9
{
10
    var eventDivisionRepository = scope.ServiceProvider.GetRequiredService<IEventDivisionRepository>();
11
    target.Status = EventDivisionStatus.Unveiled;
12
    await eventDivisionRepository.UpdateEventDivisionAsync(target);
13
}