Example #1
0
        private async Task InsertSnapshotRealmDetailAsync(long snapshotId, Models.Realm realm, CancellationToken stoppingToken)
        {
            var entry = new SnapshotRealm
            {
                SnapshotId = snapshotId,
                RealmId    = realm.Id
            };

            await _dbContext.AddAsync(entry, stoppingToken);
        }
Example #2
0
        private async Task <Models.Realm> InsertRealmAsync(Common.Models.Realm realm, CancellationToken stoppingToken)
        {
            var entry = new Models.Realm
            {
                Name = realm.Name,
                Slug = realm.Slug
            };

            var result = await AddAsync(_dbContext.Realms, entry);

            _dbContext.SaveChanges();
            return(_dbContext.Realms.First(r => r.Name == entry.Name));
        }