21 lines
576 B
C#
21 lines
576 B
C#
using EF_Demo;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
Console.OutputEncoding = System.Text.Encoding.UTF8;
|
|
|
|
using ServiceProvider serviceProvider = DISetup.BuildDI();
|
|
|
|
Demo.PrintPeople(serviceProvider, 1976);
|
|
Util.EnterToContinue();
|
|
|
|
int? eventId = Demo.AddEvent(serviceProvider, "Spring festival", new DateOnly(2026, 4, 30));
|
|
Util.EnterToContinue();
|
|
|
|
if (eventId.HasValue)
|
|
{
|
|
Demo.PostponeEvent(serviceProvider, eventId.Value, days: 5);
|
|
Util.EnterToContinue();
|
|
|
|
Demo.DeleteEvent(serviceProvider, eventId.Value);
|
|
Util.EnterToContinue(clearConsole: false);
|
|
} |