Raspisanie/Zurnal/Date/Repository/GroupRepositoryImpl.cs

85 lines
2.3 KiB
C#
Raw Normal View History

2024-10-23 08:14:10 +00:00
using Zurnal.domain.Models;
2024-10-21 11:56:16 +00:00
using System.Diagnostics;
using Zurnal.Date.LocalDate;
using Zurnal.Date.Repository;
2024-10-23 08:14:10 +00:00
namespace Zurnal.Data.Repository
2024-10-21 11:56:16 +00:00
{
[DebuggerDisplay($"{{{nameof(GetDebuggerDisplay)}(),nq}}")]
public class GroupRepositoryImpl : IGroupRepository
{
public List<GroupLocalEntity> 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();
}
2024-11-01 07:49:39 +00:00
public List<GroupLocalEntity> AllGroup => throw new NotImplementedException();
2024-10-21 11:56:16 +00:00
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();
}
2024-11-01 07:49:39 +00:00
public void AddGroupFromRegex(System.Text.RegularExpressions.Group group)
{
throw new NotImplementedException();
}
System.Text.RegularExpressions.Group IGroupRepository.GetGroupById(int id)
{
throw new NotImplementedException();
}
IEnumerable<System.Text.RegularExpressions.Group> IGroupRepository.GetAllGroups()
{
throw new NotImplementedException();
}
public void UpdateGroup(System.Text.RegularExpressions.Group group)
{
throw new NotImplementedException();
}
public void DeleteGroup(int id)
{
throw new NotImplementedException();
}
2024-10-21 11:56:16 +00:00
}
}