diff --git a/changelog.md b/changelog.md index 825c32f..e63978d 100644 --- a/changelog.md +++ b/changelog.md @@ -1 +1,4 @@ # Changelog + +## 0.1.0 +Initial release diff --git a/readme.md b/readme.md index 46a53c7..8cdbb86 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,25 @@ # Funcky.EntityFrameworkCore [![Build](https://github.com/polyadic/funcky-efcore/workflows/Build/badge.svg)](https://github.com/polyadic/funcky-efcore/actions?query=workflow%3ABuild) +[![Nuget](https://img.shields.io/nuget/v/Funcky.EntityFrameworkCore)](https://www.nuget.org/packages/Funcky.EntityFrameworkCore/) +[![Changelog: changelog.md](https://img.shields.io/badge/changelog-changelog.md-orange)](./changelog.md) [![Licence: MIT](https://img.shields.io/badge/licence-MIT-green)](https://raw.githubusercontent.com/polyadic/funcky-efcore/master/LICENSE-MIT) [![Licence: Apache](https://img.shields.io/badge/licence-Apache-green)](https://raw.githubusercontent.com/polyadic/funcky-efcore/master/LICENSE-Apache) +## Features +### Extension Methods for `IQueryable` +This package provides the extension methods `FirstOrNoneAsync`, `LastOrNoneAsync` and `SingleOrNoneAsync` for EF Core's `IQueryable` objects. +These are analogous to the ones provided by [`EntityFrameworkQueryableExtensions`]. + +Example: +```csharp +using System; +using Funcky.EntityFrameworkCore.Extensions; +using Microsoft.EntityFrameworkCore; + +DbContext context; +var firstPerson = await context.Set().FirstOrNoneAsync(); +firstPerson.AndThen(p => Console.WriteLine($"Hello {p.FirstName}!")); +``` + +[`EntityFrameworkQueryableExtensions`]: https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.entityframeworkqueryableextensions?view=efcore-5.0