Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }