public async Task RemoveTagAsync(Guid id, Core.Entities.Tag tag) { var filter = Builders <Recipe> .Filter.Eq(e => e.Id, id); var update = Builders <Recipe> .Update.Pull <Core.Entities.Tag>(e => e.Tags, tag); await _context.Recipes.UpdateOneAsync(filter, update); }
public async Task CreateTagAsync(Entity.Tag tag) { await _context.Tags.InsertOneAsync(tag); }