pr/Demo/UI/GroupConsole.cs

45 lines
1.0 KiB
C#
Raw Permalink Normal View History

2024-10-25 20:08:16 +00:00
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");
}
}
}
}
}