using Microsoft.EntityFrameworkCore; namespace MyWebLog.Data; public static class PageExtensions { /// /// Retrieve a page by its ID (non-tracked) /// /// The ID of the page to retrieve /// The requested page (or null if it is not found) public static async Task FindById(this DbSet db, string id) => await db.FirstOrDefaultAsync(p => p.Id == id).ConfigureAwait(false); }