mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-15 01:54:43 +00:00
Add brewery discovery & detail pages with location-based search (#253)
This commit is contained in:
@@ -21,6 +21,20 @@ public interface IBreweryRepository
|
||||
/// <param name="offset">Number of rows to skip. Treated as zero if <see langword="null" />.</param>
|
||||
Task<IEnumerable<BreweryPost>> GetAllAsync(int? limit, int? offset);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves brewery posts with a set location within <paramref name="rangeInMetres" /> of
|
||||
/// <paramref name="coords" />, nearest first. Posts without coordinates are excluded.
|
||||
/// </summary>
|
||||
/// <param name="coords">The origin point to measure distance from.</param>
|
||||
/// <param name="rangeInMetres">The maximum distance, in metres, from <paramref name="coords" />.</param>
|
||||
Task<IEnumerable<BreweryPost>> GetAllLocationsWithinRange(CoordinateData coords, double rangeInMetres);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves all brewery posts that have a set location, ordered by <c>BreweryPostId</c>. Posts
|
||||
/// without coordinates are excluded.
|
||||
/// </summary>
|
||||
Task<IEnumerable<BreweryPost>> GetAllLocations();
|
||||
|
||||
/// <summary>
|
||||
/// Updates a brewery post's name and description, and upserts or clears its location, enforcing
|
||||
/// optimistic concurrency via <paramref name="brewery" />'s <c>RowVersion</c>: the update is rejected
|
||||
@@ -48,4 +62,4 @@ public interface IBreweryRepository
|
||||
/// Thrown when <paramref name="brewery" />'s <c>PostedById</c> or <c>Location.CityId</c> does not exist.
|
||||
/// </exception>
|
||||
Task CreateAsync(BreweryPost brewery);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user