pr/Demo/UI/GroupConsole.cs
2024-10-25 23:08:16 +03:00

45 lines
1.0 KiB
C#

using Demo.domain.Models;
using Demo.Domain.UseCase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Demo.UI
{
public class GroupConsole
{
internal class GroupConsoleUI
{
GroupUseCase _groupUseCase;
public GroupConsoleUI(GroupUseCase groupUseCase)
{
_groupUseCase = groupUseCase;
}
public void AllGroups()
{
foreach (var Group in _groupUseCase.GetAllGroups())
{
Console.WriteLine($"{Group.Id}\t{Group.Name}");
}
}
public void UpdateGroup(int groupId, GroupLocalEntity updatedGroup)
{
if (updatedGroup == null)
{
throw new ArgumentNullException(nameof(updatedGroup), "Обновленная группа не может быть null");
}
}
}
}
}