DistrictsInTown.Api.Repositories.PlaceRepository.Get C# (CSharp) Method

Get() public method

Gets a collection with all available objects of type Place.
public Get ( ) : IEnumerable
return IEnumerable
        public IEnumerable<Place> Get()
        {
            var container = new DistrictsInTownModelContainer();

            return ToPlaceList(container.Places);
        }

Same methods

PlaceRepository::Get ( IList keyword ) : IEnumerable

Usage Example

        /// <summary>
        ///     Gets a narrowed list of <see cref="Place" /> items that starts with the specified expression.
        /// </summary>
        /// <param name="startsWith">The search criteria.</param>
        /// <returns>A narrowed list of <see cref="Place" /> items.</returns>
        public IEnumerable<Place> Narrowed(string startsWith)
        {
            var repository = new PlaceRepository();

            return repository.Get()
                .Where(p => p.Source.StartsWith(startsWith, StringComparison.InvariantCultureIgnoreCase));
        }
All Usage Examples Of DistrictsInTown.Api.Repositories.PlaceRepository::Get
PlaceRepository