/// <summary> /// Method to get a list of Version entities. /// </summary> /// <param name="op">A list of options list filters <see cref="VersionOptionsList"/></param> /// <returns>A list of Version entities.</returns> public List <VersionEntity> List(VersionOptionsList op = null) { // Initialize default option list. op = op ?? new VersionOptionsList { }; // Initialize query. IQueryable <VersionEntity> query = Connector.Versions; // Check for include primary keys to search in. query.QueryListInclude(op); // Check for exclude primary keys in search. query.QueryListExclude(op); // Set number elements to skip & the number elements to select. query.QueryStartLimit(op); // Return a list of entities. return(query.ToList()); }
/// <summary> /// Method to get an <see cref="ObservableCollection{T}"/> of <see cref="VersionEntity"/> asynchronously. /// </summary> /// <param name="op">Version list options to perform query.</param> /// <returns>An <see cref="ObservableCollection{T}"/> of <see cref="VersionEntity"/>.</returns> public Task <ObservableCollection <VersionEntity> > ListAsync(VersionOptionsList op = null) => Task.Run(() => { return(List(op)); });
/// <summary> /// Method to get an <see cref="ObservableCollection{T}"/> of <see cref="VersionEntity"/>. /// </summary> /// <param name="op">Version list options to perform query.</param> /// <returns>An <see cref="ObservableCollection{T}"/> of <see cref="VersionEntity"/>.</returns> public ObservableCollection <VersionEntity> List(VersionOptionsList op = null) { using (Db.Context) { return(new ObservableCollection <VersionEntity>(VersionManager.List(op))); } }