Quick Start

Back End

Install Packages

Nuget: Install-Package EntitySignal.Server

Configure Startup.cs

Add AddEntitySignal() as a service in the ConfigureServices function

public void ConfigureServices(IServiceCollection services)
  //Normal stuff here

Map a EntitySignalHub with SignalR to /dataHub endpoint.

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
  app.UseEndpoints(endpoints =>

  //or do this for core 2.x
  //app.UseSignalR(routes =>
  //  routes.MapHub<EntitySignalHub>("/dataHub");

Use Entity Signal Data Context

Replace IdentityDbContext with EntitySignalIdentityDbContext or DbContext with EntitySignalDbContext.

Add a EntitySignalDataProcess dependency injection and pass into the base class.

public class ApplicationDbContext : EntitySignalIdentityDbContext
  public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options,
    EntitySignalDataProcess entitySignalDataProcess)
      : base(options, entitySignalDataProcess)

Create Subscribe Endpoint

The below function subscribes to all changes of type Message

public ActionResult<IEnumerable<Message>> SubscribeToAllMessages()

  return _db.Messages.ToList();

The below function subscribes to all changes of type Message where the ID is odd.

public IEnumerable<Message> SubscribeToOddIdMessages()
  var userContainer = _entitySignalSubscribe.Subscribe<Message>(x=> x.Id % 2 == 1);

  return _db.Messages

Front End (VanillaJs)

Install Packages

NPM: npm install entity-signal or download from GitHub

Add Javascript Files To Html After SignalR

<script src=""></script>
<script src=""></script>

Create Client and Begin Syncing Data

var client = new EntitySignal.Client();
var syncedList;
  syncedList = x;

Not using VanillaJs?

Configure Front End Using AngularJs

Configure Front End Using React

Configure Front End Using Vue