Пример #1
0
        public override async Task RebuildModel(int localId)
        {
            var canceledClassesRealm = new Services.Realms.CanceledClasses();
            await canceledClassesRealm.WriteAsync(tempRealm =>
            {
                var item = tempRealm.Get(localId);

                var classesRealm = new Services.Realms.Classes();
                var classId      = item.ClassId;
                var classItem    = classesRealm.Get(x => x.Id == classId);
                item.Class       = classItem;
            });
        }
Пример #2
0
        public override async Task RebuildModel(int localId)
        {
            var attendanceRecordsRealm = new Services.Realms.AttendanceRecords();
            await attendanceRecordsRealm.WriteAsync(tempRealm =>
            {
                var item = tempRealm.Get(localId);

                var classesRealm = new Services.Realms.Classes();
                var classId      = item.ClassId;
                var classItem    = classesRealm.Get(x => x.Id == classId);
                item.Class       = classItem;

                var profilesRealm = new Services.Realms.Profiles();
                var profileId     = item.ProfileId;
                var profileItem   = profilesRealm.Get(x => x.Id == profileId);
                item.Profile      = profileItem;
            });
        }