public JsonResult Like(JobOpportunityLike model)
        {
            var cookieName = GetLikeCookieName(model.JobOpportunityId);

            if (CookieHelper.Exists(cookieName))
            {
                Response.StatusCode = (int)HttpStatusCode.BadRequest;
                return Json(new { error = true, message = "Ya has votado por este empleo." });
            }

            _jobOpportunityLikeService.CreateNewLike(model);

            CookieHelper.Set(cookieName, model.JobOpportunityId.ToString());

            var jobLikeData = _jobOpportunityLikeService.GetLikesByJobOpportunityId(model.JobOpportunityId);

            var jobOpportunityLikeData = new JobOpportunityLikeViewModel
            {
                Likes = jobLikeData.Count(x => x.Like),
                DisLikes = jobLikeData.Count(x => !x.Like)
            };

            return Json(new { error = false, data = jobOpportunityLikeData });
        }
 public void CreateNewLike(JobOpportunityLike jopOpportunityLike)
 {
     _jobOpportunityLikeRepository.Add(jopOpportunityLike);
     _jobOpportunityLikeRepository.SaveChanges();
 }