Esempio n. 1
0
        public override async Task UpdateModel(int localId)
        {
            var evaluationSectionsRealm = new Services.Realms.EvaluationSections();
            await evaluationSectionsRealm.WriteAsync(tempRealm =>
            {
                var item = tempRealm.Get(localId);

                if (item.Evaluation != null)
                {
                    item.EvaluationId = item.Evaluation.Id;
                }
            });
        }
Esempio n. 2
0
        public override async Task RebuildModel(int localId)
        {
            var evaluationSectionsRealm = new Services.Realms.EvaluationSections();
            await evaluationSectionsRealm.WriteAsync(tempRealm =>
            {
                var item = tempRealm.Get(localId);

                var evaluationsRealm = new Services.Realms.Evaluations();
                var evaluationId     = item.EvaluationId;
                var evaluationItem   = evaluationsRealm.Get(x => x.Id == evaluationId);
                item.Evaluation      = evaluationItem;
            });
        }