Exemplo n.º 1
0
        public override async Task UpdateModel(int localId)
        {
            var usersRealm = new Services.Realms.Users();
            await usersRealm.WriteAsync(tempRealm =>
            {
                var item = tempRealm.Get(localId);

                if (item.Profile != null)
                {
                    item.ProfileId = item.Profile.Id;
                }
            });
        }
Exemplo n.º 2
0
        public override async Task RebuildModel(int localId)
        {
            var usersRealm = new Services.Realms.Users();
            await usersRealm.WriteAsync(tempRealm =>
            {
                var item = tempRealm.Get(localId);

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