slarny4/Demo1/Data/Repository/GroupRepositoryImpl.cs
2024-10-22 01:57:01 +03:00

28 lines
599 B
C#

using Demo.Data.LocalData.Entity;
using Demo.Domain.Models;
using System.Collections.Generic;
namespace Demo.Data.Repository
{
public class GroupRepositoryImpl
{
private List<ClassGroup> groups;
public GroupRepositoryImpl()
{
groups = new List<ClassGroup>();
}
public List<ClassGroup> GetAllGroups()
{
return groups;
}
public void AddGroup(ClassGroup group)
{
if (group == null) throw new ArgumentNullException(nameof(group));
groups.Add(group);
}
}
}