slarny4/Demo1/Data/Repository/GroupRepositoryImpl.cs

28 lines
599 B
C#
Raw Normal View History

2024-10-21 22:57:01 +00:00
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);
}
}
}