Ejemplo n.º 1
0
        public void AddWorking(int jobId)
        {
            UserRepository repo  = new UserRepository(_connectionString);
            JobRepository  repoJ = new JobRepository(_connectionString);

            Working w = new Working {
                UserId = repo.GetUserByEmail(Context.User.Identity.Name).Id
            };

            repoJ.AddWorking(w, jobId);
            Clients.Others.SendAsync("NewWorking", new { Name = repo.GetUserByEmail(Context.User.Identity.Name).Name, JobId = jobId });
        }