/// <summary> /// Method to get a list of <see cref="PictureEntity"/>. /// </summary> /// <param name="op"><see cref="PictureOptionsList"/> filters options for the query.</param> /// <returns>An <see cref="ObservableCollection{PictureEntity}"/>.</returns> public ObservableCollection <PictureEntity> List(PictureOptionsList op) { using (Db.Context) { return(new ObservableCollection <PictureEntity>(PictureManager.List(op))); } }
/// <summary> /// Method to get a list of <see cref="PictureEntity"/> asynchronously. /// </summary> /// <param name="op"><see cref="PictureOptionsList"/> filters options for the query.</param> /// <returns>An <see cref="ObservableCollection{PictureEntity}"/>.</returns> public Task <ObservableCollection <PictureEntity> > ListAsync(PictureOptionsList options = null) => Task.Run(() => { return(List(options)); });