public async Task <ActionResult> FavoriteJobDelete(Guid jobOfferId)
        {
            var applicant = await ApplicantFacade.GetApplicantAccordingToUsernameAsync(User.Identity.Name);

            Guid favoriteJobId = await JobOfferFacade.GetFavoriteByApplicantAndOffer(applicant.Id, jobOfferId);

            await JobOfferFacade.DeleteFavoriteJobOfferAsync(favoriteJobId);

            return(RedirectToAction("JobOfferList", "Applicant"));
        }
        public async Task <ActionResult> ApplicationCreate(ApplicationDto model)
        {
            var applicant = await ApplicantFacade.GetApplicantAccordingToUsernameAsync(User.Identity.Name);

            model.ApplicantId = applicant.Id;
            model.State       = ApplicationState.Undecided;
            await ApplicationFacade.CreateApplicationAsync(model);

            Guid favoriteJobId = await JobOfferFacade.GetFavoriteByApplicantAndOffer(applicant.Id, model.JobOfferId);

            if (favoriteJobId != Guid.Empty)
            {
                await JobOfferFacade.DeleteFavoriteJobOfferAsync(favoriteJobId);
            }

            return(RedirectToAction("ApplicationList", "Applicant"));
        }