first commit

This commit is contained in:
Your Name 2024-10-17 15:13:34 +03:00
parent d5ff9f45a5
commit 26da83afba
5 changed files with 6 additions and 6 deletions

View File

@ -19,7 +19,7 @@ namespace Demo.Data.Repository
GetAllGroups.Add(groupLocalEntity); GetAllGroups.Add(groupLocalEntity);
} }
public GroupLocalEntity? UpdateUserById(GroupLocalEntity groupUpdateLocalEntity) public GroupLocalEntity? UpdateGroup(GroupLocalEntity groupUpdateLocalEntity)
{ {
int index = GetAllGroups.FindIndex(x => x.ID == groupUpdateLocalEntity.ID); int index = GetAllGroups.FindIndex(x => x.ID == groupUpdateLocalEntity.ID);
if (index == -1) return null; if (index == -1) return null;

View File

@ -23,14 +23,14 @@ namespace Demo.Domain.UseCase
return true; return true;
} }
public Group UpdateUser(Group group) public Group UpdateGroup(Group group)
{ {
GroupLocalEntity groupLocalEntity = new GroupLocalEntity GroupLocalEntity groupLocalEntity = new GroupLocalEntity
{ {
ID = group.ID, ID = group.ID,
Name = group.Name Name = group.Name
}; };
GroupLocalEntity? result = _repositoryGroupImpl.UpdateUserById(groupLocalEntity); GroupLocalEntity? result = _repositoryGroupImpl.UpdateGroup(groupLocalEntity);
if (result == null) if (result == null)
{ {
throw new Exception("Не удалось обновить пользователя: пользователь не найден."); throw new Exception("Не удалось обновить пользователя: пользователь не найден.");

View File

@ -74,7 +74,7 @@ namespace Demo.UI
{ {
try try
{ {
Group output = _groupUseCase.UpdateUser(group); Group output = _groupUseCase.UpdateGroup(group);
StringBuilder groupOutput = new StringBuilder(); StringBuilder groupOutput = new StringBuilder();
groupOutput.AppendLine($"Обновленная группа: {output.ID}\t{output.Name}"); groupOutput.AppendLine($"Обновленная группа: {output.ID}\t{output.Name}");
Console.WriteLine(groupOutput); Console.WriteLine(groupOutput);

View File

@ -13,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Demo")] [assembly: System.Reflection.AssemblyCompanyAttribute("Demo")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [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.AssemblyProductAttribute("Demo")]
[assembly: System.Reflection.AssemblyTitleAttribute("Demo")] [assembly: System.Reflection.AssemblyTitleAttribute("Demo")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View File

@ -1 +1 @@
eb16b2b154799358c5c37f7f25193ef306ab5592617791ff431f7a24a66875c2 5bce74879fd45efe103c6f650dd3b5b74cc20c28f77d21ab4268da5f80b45640