first commit
This commit is contained in:
parent
d5ff9f45a5
commit
26da83afba
@ -19,7 +19,7 @@ namespace Demo.Data.Repository
|
||||
GetAllGroups.Add(groupLocalEntity);
|
||||
}
|
||||
|
||||
public GroupLocalEntity? UpdateUserById(GroupLocalEntity groupUpdateLocalEntity)
|
||||
public GroupLocalEntity? UpdateGroup(GroupLocalEntity groupUpdateLocalEntity)
|
||||
{
|
||||
int index = GetAllGroups.FindIndex(x => x.ID == groupUpdateLocalEntity.ID);
|
||||
if (index == -1) return null;
|
||||
|
@ -23,14 +23,14 @@ namespace Demo.Domain.UseCase
|
||||
return true;
|
||||
}
|
||||
|
||||
public Group UpdateUser(Group group)
|
||||
public Group UpdateGroup(Group group)
|
||||
{
|
||||
GroupLocalEntity groupLocalEntity = new GroupLocalEntity
|
||||
{
|
||||
ID = group.ID,
|
||||
Name = group.Name
|
||||
};
|
||||
GroupLocalEntity? result = _repositoryGroupImpl.UpdateUserById(groupLocalEntity);
|
||||
GroupLocalEntity? result = _repositoryGroupImpl.UpdateGroup(groupLocalEntity);
|
||||
if (result == null)
|
||||
{
|
||||
throw new Exception("Не удалось обновить пользователя: пользователь не найден.");
|
||||
|
@ -74,7 +74,7 @@ namespace Demo.UI
|
||||
{
|
||||
try
|
||||
{
|
||||
Group output = _groupUseCase.UpdateUser(group);
|
||||
Group output = _groupUseCase.UpdateGroup(group);
|
||||
StringBuilder groupOutput = new StringBuilder();
|
||||
groupOutput.AppendLine($"Обновленная группа: {output.ID}\t{output.Name}");
|
||||
Console.WriteLine(groupOutput);
|
||||
|
@ -13,7 +13,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Demo")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d5ff9f45a55af13593d3b8a9b65ecffccf59b0a7")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Demo")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Demo")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
eb16b2b154799358c5c37f7f25193ef306ab5592617791ff431f7a24a66875c2
|
||||
5bce74879fd45efe103c6f650dd3b5b74cc20c28f77d21ab4268da5f80b45640
|
||||
|
Loading…
Reference in New Issue
Block a user