2024-11-16 21:45:57 +00:00
|
|
|
|
using console_ui;
|
|
|
|
|
using data;
|
|
|
|
|
using data.DAO;
|
|
|
|
|
using data.Repository;
|
|
|
|
|
using domain.Service;
|
|
|
|
|
|
|
|
|
|
void printAllGroups(IGroupRepository groupRepository)
|
|
|
|
|
{
|
|
|
|
|
foreach (var item in groupRepository.getAllGroup())
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine(item.Name);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RemoteDatabaseContext remoteDatabaseContext = new RemoteDatabaseContext();
|
|
|
|
|
SQLGroupRepository groupRepository = new SQLGroupRepository(remoteDatabaseContext);
|
|
|
|
|
LocalGroupRepository localGroupRepository = new LocalGroupRepository();
|
|
|
|
|
GroupService groupService = new GroupService(groupRepository);
|
|
|
|
|
GroupUI group = new GroupUI(groupService);
|
|
|
|
|
|
|
|
|
|
group.AddGroup();
|
|
|
|
|
|
|
|
|
|
printAllGroups(groupRepository);
|
|
|
|
|
|
|
|
|
|
|