title: Update UI with SignalR and Knockout when manually updating DB
body: <p>I have had a search around SO for this, but didn't come across anything obvious.  I have a dashboard of jobs, and their status continually changes throughout the day and I'm trying to put together some proof of concept applcation and manually trigger the updates by running update commands in the database. This is what I have set up, but when I execute an update, I don't see any changes in the UI, can you see where I have gone wrong? </p>
  
  <p>Hub:</p>
  
  <pre><code>public class DashboardHub : Hub
  {
      private readonly Repository _repository;
  
      public DashboardHub()
      {
          _repository= new Repository();
      }
  
      public void GetJobs()
       {
           var jobs =  _repository.GetJobs();
  
          Clients.All.allJobsRetrieved(jobs);
       }
  }
  </code></pre>
  
  <p>Knockout View Model</p>
  
  <pre><code>$(function () {
      $(function () {
          function jobViewModel(id, name, isPaused, currentStatus, cob, owner) {
              this.hub = $.connection.dashboardHub;
  
              //job variables, initialised from params
              this.Id = id;
              this.Name = ko.observable(name);
              this.IsPaused = ko.observable(isPaused);
              this.CurrentStatus = ko.observable(currentStatus);
              this.Cob = ko.observable(cob);
          }
  
          function dashboardViewModel() {
              this.hub = $.connection.dashboardHub;
  
              //jobs collection
              this.jobs = ko.observableArray([]);
  
              //reference to jobs collection
              var jobs = this.jobs;
  
              //load jobs, calling server side hub method
              this.init = function () {
                  this.hub.server.getJobs();
              };
  
              //callback from server side hub sending jobs to client
              this.hub.client.allJobsRetrieved = function (allJobs) {
                  var mappedJobs = $.map(allJobs, function (job) {
                      return new jobViewModel(job.Id, job.Name, job.IsPaused, job.CurrentStatus, job.CoB, self);
                  });
  
                  jobs(mappedJobs);
              };
  
              //callback from server side hub sending error messages to client
              this.hub.client.raiseError = function (error) {
                  $("#error").text(error);
              };
          }
  
          //set up the viewmodel
          var viewModel = new dashboardViewModel();
          ko.applyBindings(viewModel);
  
          //call to initialise
          $.connection.hub.start(function () {
              viewModel.init();
          });
      });
  });
  </code></pre>