public JsonResult AdimDataKaydet(Guid id, string sonucData)
        {
            var isAtamaRepo   = new IsAtamaRepo();
            var baglayiciRepo = new BaglayiciRepo();
            var isAtama       = isAtamaRepo.Queryable().First(x => x.Id == id);
            var baglayici     = baglayiciRepo.Queryable().FirstOrDefault(x => x.SemaId == isAtama.SemaId && x.Id == isAtama.SonAdimId);

            if (baglayici == null)
            {
                isAtama.TamamlandiMi = true;
                if (isAtamaRepo.Update() > 0)
                {
                    var hubContext = GlobalHost.ConnectionManager.GetHubContext <WorkflowHub>();
                    var user       = MembershipTools.NewUserManager().FindById(isAtama.AtananKullaniciId);
                    hubContext.Clients.User(user.UserName).endCurrentTask();
                    return(Json(true));
                }
                else
                {
                    return(Json(false));
                }
            }
            isAtama.SonAdimId     = baglayici.Id2;
            isAtama.SonucDataJson = sonucData;
            var result = isAtamaRepo.Update() > 0;

            return(Json(result));
        }
        public static int GetTodoCount(string userId)
        {
            var repo  = new IsAtamaRepo();
            var count = repo.Queryable().Count(x => x.AtananKullaniciId == userId && !x.TamamlandiMi);

            return(count);
        }