public static Empresa ObtenerConfiguracion(Guid Id) { var configService = new EmpresaService(); var config = configService.GetById(Id); if (config == null) { throw new Exception("Error al obtener empresa"); } configService.Dispose(); return(config); }