public async Task <bool> UpdateRecipe(ReceipeModel receipeModel) { var result = await receipeCollection.ReplaceOneAsync <ReceipeModel>(receipe => receipe.ReceipeID == receipeModel.ReceipeID, receipeModel); return(result.IsAcknowledged); }
public async Task <bool> RemoveReceipe(ReceipeModel receipeModel) { var result = await receipeCollection.DeleteOneAsync <ReceipeModel>(receipe => receipe.ReceipeID == receipeModel.ReceipeID); return(result.IsAcknowledged); }
public async Task <ReceipeModel> CreateReceipeAsync(ReceipeModel receipeModel) { await receipeCollection.InsertOneAsync(receipeModel); return(receipeModel); }