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("Enter group name: "); _groupService.AddGroup(new domain.Request.AddGroupRequest { Name = Console.ReadLine() }); } public void AddGroupWithStudents() { Console.WriteLine("Enter group name: "); AddGroupRequest addGroupRequest = new AddGroupRequest { Name = Console.ReadLine() }; List addStudentRequests = new List() { new AddStudentRequest{ StudentName = "StudentName1"}, new AddStudentRequest{ StudentName = "StudentName2"}, new AddStudentRequest{ StudentName = "StudentName3"}, new AddStudentRequest{ StudentName = "StudentName4"}, }; AddGroupWithStudentsRequest addGroupWithStudents = new AddGroupWithStudentsRequest { addGroupRequest = addGroupRequest, addStudentRequests = addStudentRequests }; _groupService.AddGroupWithStudents(addGroupWithStudents); } } }