Esempio n. 1
0
        public async Task Delete(int id)
        {
            try
            {
                var item = await _repository.GetByID(id);

                _repository.Delete(item);
                _repository.Save();
            }
            catch (Exception e)
            {
                _logger.LogError($"There is a problem with delete Time : {e}");
            }
        }
Esempio n. 2
0
        public TimeRule Get(int id)
        {
            TimeRule value = timeRepo.GetByID(id);

            return(value != null ? new TimeRule(value) : null);
        }