public AddSubjectRequest(string name, string description, string code, SubjectWeekDay weekDay, SubjectDayPeriod dayPeriod) { Name = name; Description = description; Code = code; WeekDay = weekDay; DayPeriod = dayPeriod; }
public Subject(string name, string description, string code, SubjectWeekDay weekDay, SubjectDayPeriod dayPeriod) { SubjectId = Guid.NewGuid().ToString(); Name = name; Description = description; Code = code; WeekDay = weekDay; DayPeriod = dayPeriod; new AddNotifications <Subject>(this) .IfLengthGreaterThan(Name, 150, "O nome não pode ser maior que 150 caracteres") .IfLengthGreaterThan(Description, 300, "A descrição não pode ser maior que 300 caracteres!") .IfEnumInvalid(WeekDay, "Insira um valor válido!") .IfEnumInvalid(DayPeriod, "Insira um valor válido!"); }