private void LoadData() { BsonDocument document = GetCollection().zFindOneById<BsonDocument>(BsonValue.Create(_id)); if (document != null) _downloadAutomate = BsonSerializer.Deserialize<DownloadAutomate>(document); else _downloadAutomate = CreateData(); }
private void LoadData() { BsonDocument document = GetCollection().zFindOneById <BsonDocument>(BsonValue.Create(_id)); if (document != null) { _downloadAutomate = BsonSerializer.Deserialize <DownloadAutomate>(document); } else { _downloadAutomate = CreateData(); } }