Ejemplo n.º 1
0
        public async Task <Reading> SetReadingAsync(Reading reading)
        {
            try
            {
                if (reading == null)
                {
                    throw new ArgumentNullException("Reading");
                }

                await _readingService.AddOrUpdateAsync(reading);

                Update(reading.Id);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }

            return(reading);
        }