26 lines
652 B
C#
26 lines
652 B
C#
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);
|
|
|
|
|