Ejemplo n.º 1
0
        internal ResultAction Get()
        {
            List <Configuration> configurations = new ConfigurationService().Get();
            ResultAction         result         = new ResultAction();

            if (configurations.Any())
            {
                result.IsOk   = true;
                result.Result = configurations
                                .Select(x => new ConfigurationDTO
                {
                    Id         = x.Id,
                    TimeConfig = (int)x.TimeConfig,
                    Value      = x.Value
                })
                                .FirstOrDefault();
            }
            else
            {
                result.Message = "Nenhuma configuração encontrado.";
            }

            return(result);
        }