Hello,
I am using .Net Core with Mongo DB using Driver for .Net. When i use the ReplaceOne option to update my document, its additionally added a field inside the document with the name of the collection name like this _t_Offer this the code i am using for replace option. Its happen for this collection only remaining working as expected.
> public async Task ReplaceSingleElementAsync<T>(string resourceName, T updatedElement) where T : ParseObject
{ ReplaceOneResult result = null; try { result = await dataBase.GetCollection<T>(resourceName).ReplaceOneAsync(s => s.Id.Equals(updatedElement.Id), updatedElement, new ReplaceOptions { IsUpsert = false, BypassDocumentValidation = false }); if (!result.IsAcknowledged) throw new Exception("Not properly updated!"); } catch (Exception exception) { _logger.LogError(exception.Message, null); throw; } }