protected Device MapToDevice(BayerStickInfoResponse information) { Device dev = new Device(); dev.Name = information.ModelNumber; dev.SerialNumber = information.SerialNumber; dev.SerialNumberFull = information.SerialNumberFull; //dev.FullInfo = information.Value; return(dev); }
private void ReplaceOne(BayerStickInfoResponse device) { string collectionname = "600BayerStickInfo"; var coll = _db.GetCollection <BayerStickInfoResponse>(collectionname); var filter = Builders <BayerStickInfoResponse> .Filter .Eq(x => x.SerialNumberFull, device.SerialNumber); coll.ReplaceOne(filter, device); }