示例#1
0
        public void CreateViewTest()
        {
            var data = GetRandom.Object <TimetableEntryData>();
            var view = TimetableEntryViewFactory.Create(new TimetableEntry(data));

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

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

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

            foreach (var e in list)
            {
                TimetableEntries.Add(TimetableEntryViewFactory.Create(e));
            }
        }
示例#4
0
 protected internal override TimetableEntryView ToView(TimetableEntry obj)
 {
     return(TimetableEntryViewFactory.Create(obj));
 }
示例#5
0
 protected internal override TimetableEntry ToObject(TimetableEntryView view)
 {
     return(TimetableEntryViewFactory.Create(view));
 }