Пример #1
0
        public bool Update(Measurement entity)
        {
            if (entity == null)
            {
                throw new ArgumentNullException(nameof(entity));
            }
            Load(entity);

            var r = _data.Measurements.Find(entity.MeasurementId);

            if (r == null)
            {
                return(false);
            }
            _data.Entry(r).CurrentValues.SetValues(entity);

            return(true);
        }