RealtimeDatabase 1.0.0

A .NET Core Extension for Entity Framework Core to enable Realtime Capability.

Suggested Alternatives

SapphireDb

Additional Details

The project was renamed to SapphireDb

There is a newer version of this package available.
See the version list below for details.
Install-Package RealtimeDatabase -Version 1.0.0
dotnet add package RealtimeDatabase --version 1.0.0
<PackageReference Include="RealtimeDatabase" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RealtimeDatabase --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

RealtimeDatabase

Realtime Database is an extension for Asp.Net Core and Entity Framework.
It enables transport of data using websockets.
The client can subscribe to specific collection data and gets notified on changes.
This enables realtime functionality and all client get the same instance.

Advantages

  • Simple configuration
  • Communication over Websockets
  • Comes with all you need: Create, Update, Delete functionality on collections
  • Server side prefilters to only query the data your client needs
  • Authentication and Authorization integrated
  • Extends Entity Framework functionality
    (normal operations on the context are also possible and changes are published to subscribing clients)

Install

Server

In an Asp.Net Core project execute

PM > Install-Package RealtimeDatabase

https://www.nuget.org/packages/RealtimeDatabase/

Use RealtimeDbContext instead of DbContext
public class MyDbContext : RealtimeDbContext
{
    //Add RealtimeDatabaseNotifier for DI
    public RealtimeContext(DbContextOptions<RealtimeContext> options, RealtimeDatabaseNotifier notifier) : base(options, notifier)
    {

    }

    public DbSet<User> Users { get; set; }

    public DbSet<Test> Tests { get; set; }
}
Register the realtime database service
services.AddRealtimeDatabase<MyDbContext>();
services.AddDbContext<MyDbContext>(cfg => ...));
Configure the request pipeline
app.UseRealtimeDatabase();

Client

Install the Angular client using

npm install ng-realtime-database linq4js
Import realtime database module in your app.module
imports: [
    BrowserModule,
    ...,
    RealtimeDatabaseModule, 
]

or using custom configuration

imports: [
    BrowserModule,
    ...,
    RealtimeDatabaseModule.config({
        serverBaseUrl: `${location.hostname}:${location.port}`
    }) 
]
Use RealtimeDatabase where you need it
constructor(private db: RealtimeDatabase) { }

RealtimeDatabase

Realtime Database is an extension for Asp.Net Core and Entity Framework.
It enables transport of data using websockets.
The client can subscribe to specific collection data and gets notified on changes.
This enables realtime functionality and all client get the same instance.

Advantages

  • Simple configuration
  • Communication over Websockets
  • Comes with all you need: Create, Update, Delete functionality on collections
  • Server side prefilters to only query the data your client needs
  • Authentication and Authorization integrated
  • Extends Entity Framework functionality
    (normal operations on the context are also possible and changes are published to subscribing clients)

Install

Server

In an Asp.Net Core project execute

PM > Install-Package RealtimeDatabase

https://www.nuget.org/packages/RealtimeDatabase/

Use RealtimeDbContext instead of DbContext
public class MyDbContext : RealtimeDbContext
{
    //Add RealtimeDatabaseNotifier for DI
    public RealtimeContext(DbContextOptions<RealtimeContext> options, RealtimeDatabaseNotifier notifier) : base(options, notifier)
    {

    }

    public DbSet<User> Users { get; set; }

    public DbSet<Test> Tests { get; set; }
}
Register the realtime database service
services.AddRealtimeDatabase<MyDbContext>();
services.AddDbContext<MyDbContext>(cfg => ...));
Configure the request pipeline
app.UseRealtimeDatabase();

Client

Install the Angular client using

npm install ng-realtime-database linq4js
Import realtime database module in your app.module
imports: [
    BrowserModule,
    ...,
    RealtimeDatabaseModule, 
]

or using custom configuration

imports: [
    BrowserModule,
    ...,
    RealtimeDatabaseModule.config({
        serverBaseUrl: `${location.hostname}:${location.port}`
    }) 
]
Use RealtimeDatabase where you need it
constructor(private db: RealtimeDatabase) { }

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
3.4.0 211 11/24/2019
3.3.1 191 11/6/2019
3.3.0 192 11/1/2019
3.2.0 214 10/13/2019
3.1.0 237 9/8/2019
3.0.4 235 8/14/2019
3.0.3 230 8/13/2019
3.0.2 240 8/9/2019
3.0.1 249 8/9/2019
3.0.0 242 8/7/2019
2.0.1 235 7/28/2019
2.0.0 241 7/14/2019
1.0.6 272 3/22/2019
1.0.5 263 3/21/2019
1.0.4 287 3/11/2019
1.0.3 279 1/29/2019
1.0.2 318 12/8/2018
1.0.1 305 10/26/2018
1.0.0 330 10/3/2018
Show less