public GymMemberCreated(Guid aggid, string sName, string sMemberNo, bool bIsGoldMember, GymGoldMemberEvents.Enums.TrainingLevels level)
 {
     AggregateId = aggid;
     Created = DateTime.Now;
     Name = sName;
     MemberNo = sMemberNo;
     IsGoldMember = bIsGoldMember;
     Level = level;
 }
Ejemplo n.º 2
0
 public void CorrectTrainingLevel(GymGoldMemberEvents.Enums.TrainingLevels level)
 {
     GoldGymMemberDomain.Enums.TrainngLevels lev;
     Enum.TryParse(level.ToString(), true, out lev);
     if (CurrentTrainingLevel != lev)
     {
         ApplyEvent<GymMemberTrainingLevelCorrected>(new GymMemberTrainingLevelCorrected(AggregateId, level));
     }
 }
Ejemplo n.º 3
0
 public void DegradeTrainingLevel(GymGoldMemberEvents.Enums.TrainingLevels newlevel)
 {
     GoldGymMemberDomain.Enums.TrainngLevels lev;
     Enum.TryParse(newlevel.ToString(), true, out lev);
     if (CurrentTrainingLevel != lev && CurrentTrainingLevel < lev)
     {
         ApplyEvent<GymMemberTrainingLevelDegraded>(new GymMemberTrainingLevelDegraded(AggregateId, newlevel));
     }
 }