A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/NickStrupat/EntityFramework.Rx below:

NickStrupat/EntityFramework.Rx: Reactive extension wrappers for *hot* observables of Entity Framework

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.

  1. Create an issue
  2. Let's find some point of agreement on your suggestion.
  3. Fork it!
  4. Create your feature branch: git checkout -b my-new-feature
  5. Commit your changes: git commit -am 'Add some feature'
  6. Push to the branch: git push origin my-new-feature
  7. Submit a pull request :D

Commit history

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