public static Note TryGetNoteById(string id) { if (notes != null && notes.Count > 0) { var note = notes.FirstOrDefault(x => x.ID == id); if (note != null) { return(note); } } try { return(LocalDB.GetWithChildren <Note>(id)); } catch (Exception) { return(null); } }