Пример #1
0
        public async Task Update(SystemActionEntity systemAction)
        {
            var filter = Builders <SystemActionEntity> .Filter.Eq(_ => _.Id, systemAction.Id);

            var update = Builders <SystemActionEntity> .Update
                         .Set(_ => _.Name, systemAction.Name)
                         .Set(_ => _.DomainTags, systemAction.DomainTags);

            await SystemActionsCollection.UpdateOneAsync(filter, update);
        }
Пример #2
0
 public async Task Create(SystemActionEntity systemAction)
 {
     await SystemActionsCollection.InsertOneAsync(systemAction);
 }