42 lines
913 B
C#
42 lines
913 B
C#
using Demo.Domain.UseCase;
|
|
using Demo.domain.Models;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Xml.Linq;
|
|
using System.Text.RegularExpressions;
|
|
|
|
namespace Demo.UI
|
|
{
|
|
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 CreateGroup(string NameGroup)
|
|
{
|
|
_groupUseCase.AddGroup(NameGroup);
|
|
}
|
|
|
|
public void UpdateNameGroup(int id, string name)
|
|
{
|
|
_groupUseCase.UpdateGroup(id, name);
|
|
}
|
|
}
|
|
}
|