示例#1
0
        public void CreateViewTest()
        {
            var data = GetRandom.Object <ParticipantOfTrainingData>();
            var view = ParticipantOfTrainingViewFactory.Create(new SportClub.Domain.ParticipantOfTraining.ParticipantOfTraining(data));

            TestArePropertyValuesEqual(view, data);
        }
示例#2
0
        public void CreateObjectTest()
        {
            var view = GetRandom.Object <ParticipantOfTrainingView>();
            var data = ParticipantOfTrainingViewFactory.Create(view).Data;

            TestArePropertyValuesEqual(view, data);
        }
示例#3
0
        public void LoadDetails(TimetableEntryView item)
        {
            Participants.Clear();

            if (item is null)
            {
                return;
            }
            participants.FixedFilter = GetMember.Name <ParticipantOfTrainingData>(x => x.TimetableEntryId);
            participants.FixedValue  = item.Id;
            var list = participants.Get().GetAwaiter().GetResult();

            foreach (var e in list)
            {
                Participants.Add(ParticipantOfTrainingViewFactory.Create(e));
            }
        }
示例#4
0
 protected internal override ParticipantOfTrainingView ToView(ParticipantOfTraining obj)
 {
     return(ParticipantOfTrainingViewFactory.Create(obj));
 }
示例#5
0
 protected internal override ParticipantOfTraining ToObject(ParticipantOfTrainingView view)
 {
     return(ParticipantOfTrainingViewFactory.Create(view));
 }
 public override ParticipantOfTrainingView ToView(Domain.ParticipantOfTraining.ParticipantOfTraining obj)
 => ParticipantOfTrainingViewFactory.Create(obj);
 public override Domain.ParticipantOfTraining.ParticipantOfTraining ToObject(ParticipantOfTrainingView view)
 => ParticipantOfTrainingViewFactory.Create(view);