pr1/Demo/UI/GroupConsole.cs

45 lines
1.0 KiB
C#
Raw Normal View History

2024-10-19 21:39:57 +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");
}
}
}
}
}