public static Setting GetAllSettings() { try { using (HomesteadViewerContext context = new HomesteadViewerContext()) { return context.Set<Setting>().FirstOrDefault(); } } catch (Exception ex) { return null; } }