Reactive extension wrappers for hot observables of Entity Framework entities.
This repo contains the code for both the EntityFramework
and EntityFrameworkCore
projects.
Simply install the NuGet package for EF6 or EF Core
DbObservable
contains methods for each event type supported, which return an IObservable.
var birthdayMessage = DbObservable<Context>.FromInserted<Person>() .Where(x => x.Entity.DateOfBirth.Month == DateTime.Today.Month && x.Entity.DateOfBirth.Day == DateTime.Today.Day) .Subscribe(entry => Console.WriteLine($"Happy birthday to {entry.Entity.Name}!"));
Specifying a DbContext type with DbObservable<T>
will contrain events to entities in a DbContext instance of that type.
Events provided by this library and the library which supports it (EntityFramework.Triggers) are co-variant. You can use a base class as T
in DbObservable<T>
and the events will be raised as expected.
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT License
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4