public void SaveProperiesProduct(PropertyProduct propertyData) { //string queryDelete = "{product_id:NumberLong(" + propertyData.ProductId + ")}"; //this._collection.DeleteMany(queryDelete); //try //{ // this._collection.InsertOne(propertyData); //} //catch (Exception ex) //{ // log.Info(ex); //} //SaveToRedis var properties = propertyData.Properties.Select(variable => new KeyValuePair <string, string>(variable.Key, variable.Value)).ToList(); _cacheMan.Set("prs:" + propertyData.ProductId, properties, true, new TimeSpan(20000, 0, 0, 0)); //database.SetAdd(propertyData.ProductId.ToString(), x); }