/
Group.cs
36 lines (32 loc) · 940 Bytes
/
Group.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cain.Domain.Entities
{
public class Group
{
protected Group() { }
public Group(string Name, string Description)
{
this.Name = Name;
this.Description = Description;
// Default properties.
CreationDateTime = DateTime.Now;
}
public int Id { get; private set; }
public string Name { get; private set; }
public string Description { get; private set; }
public DateTime CreationDateTime { get; private set; }
public ICollection<Student> Students { get; private set; }
public void AddStudent(Student student)
{
Students.Add(student);
}
public void RemoveStudent(Student student)
{
Students.Remove(student);
}
}
}