Skip to content

Commit

Permalink
Merge pull request #5 from polyadic/prepare-release
Browse files Browse the repository at this point in the history
Update readme and changelog
  • Loading branch information
FreeApophis authored Jan 13, 2021
2 parents 56aa427 + 3ef803a commit 0717f26
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# Changelog

## 0.1.0
Initial release
19 changes: 19 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -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<T>`
This package provides the extension methods `FirstOrNoneAsync`, `LastOrNoneAsync` and `SingleOrNoneAsync` for EF Core's `IQueryable<T>` 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<Person>().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

0 comments on commit 0717f26

Please sign in to comment.