using domain.Request; using domain.Service; using domain.UseCase; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace console_ui { class GroupUI { private readonly IGroupUseCase _groupService; public GroupUI(IGroupUseCase groupService) { _groupService = groupService; } public void AddGroup() { Console.WriteLine("Введите имя группы"); _groupService.AddGroup(new AddGroupRequest { Name = Console.ReadLine() }); } public void AddGroupWithStudents() { Console.WriteLine("Введите имя группы"); AddGroupRequest addGroupRequest = new AddGroupRequest { Name = Console.ReadLine()}; List addStudentRequests = new List() { new AddStudentRequest{StudentName = "123" }, new AddStudentRequest{StudentName = "312" }, new AddStudentRequest{StudentName = "222" }, new AddStudentRequest{StudentName = "444" }, }; AddGroupWithStudentsRequest addGroupWithStudents = new AddGroupWithStudentsRequest { addGroupRequest = addGroupRequest, AddStudentRequests = addStudentRequests }; _groupService.AddGroupWithSutdents(addGroupWithStudents); } } }