public async Task UpdateRecyclingCenter(RecyclingCenter recyclingCenter) { var collection = GetCollection(); var filter = Builders <RecyclingCenter> .Filter.Eq(rc => rc.Id, recyclingCenter.Id); await collection.FindOneAndReplaceAsync(filter, recyclingCenter); }
public async Task CreateRecyclingCenter(RecyclingCenter recyclingCenter) { var collection = GetCollection(); recyclingCenter.Id = $"{Guid.NewGuid()}"; await collection.InsertOneAsync(recyclingCenter); }
public void RecyclingCenterDeleted(RecyclingCenter center) { _model.BasicPublish("", DeletedQueueName, null, center.Serialize()); }