using Demo.domain.Models; using System.Diagnostics; using Zurnal.Date.LocalDate; using Zurnal.Date.Repository; namespace Demo.Data.Repository { [DebuggerDisplay($"{{{nameof(GetDebuggerDisplay)}(),nq}}")] public class GroupRepositoryImpl : IGroupRepository { public List GetAllGroups() => LocalStaticData.groups; public void AddGroup(GroupLocalEntity newGroup) { LocalStaticData.groups.Add(newGroup); } public void UpdateGroupName(int groupId, string newName) { var group = LocalStaticData.groups.FirstOrDefault(g => g.Id == groupId); if (group != null) { group.Name = newName; } } public GroupLocalEntity GetGroupById(int groupId) { return LocalStaticData.groups.FirstOrDefault(g => g.Id == groupId); } private static string GetDebuggerDisplay() { return $"GroupRepository with {LocalStaticData.groups.Count} groups"; } internal void AddGroup(Group group) { throw new NotImplementedException(); } public List GetAllGroup() { throw new NotImplementedException(); } public bool RemoveGroupById(int groupID) { throw new NotImplementedException(); } public bool UpdateGroupById(int groupID, GroupLocalEntity updatedGroup) { throw new NotImplementedException(); } bool IGroupRepository.AddGroup(GroupLocalEntity newGroup) { throw new NotImplementedException(); } } }