public IResult Add(CurriculumVitae curriculumVitae, int id)
        {
            _curriculumVitaeDal.Add(curriculumVitae);
            CvAdd(curriculumVitae);
            int Id = curriculumVitae.CurriculumVitaeId;
            var CV = new CurriculumVitae
            {
                CurriculumVitaeId  = curriculumVitae.CurriculumVitaeId,
                PersonID           = id,
                FirstName          = curriculumVitae.FirstName,
                LastName           = curriculumVitae.LastName,
                BirthDate          = curriculumVitae.BirthDate,
                PlaceOfBirth       = curriculumVitae.PlaceOfBirth,
                MaritalStatus      = curriculumVitae.MaritalStatus,
                EducationStatus    = curriculumVitae.EducationStatus,
                School             = curriculumVitae.School,
                SchoolStart        = curriculumVitae.SchoolStart,
                SchoolFinish       = curriculumVitae.SchoolFinish,
                Address            = curriculumVitae.Address,
                MobilTelefonNumber = curriculumVitae.MobilTelefonNumber,
                Mail                 = curriculumVitae.Mail,
                ForeignLanguage      = curriculumVitae.ForeignLanguage,
                ForeignLanguageLevel = curriculumVitae.ForeignLanguageLevel,
                Competences          = curriculumVitae.Competences,
                Reference            = curriculumVitae.Reference,
                CvPdf                = this.CvPdf
            };

            _curriculumVitaeDal.Update(CV);
            return(new SuccessResult(Messages.CurriculumVitaeAdded));
        }
        public IResult Add(CurriculumVitae cv, IFormFile file)
        {
            var ruleResult = BusinessRules.Run(ExtensionCheck(file));

            if (ruleResult != null)
            {
                return(ruleResult);
            }

            var pathCreator = PathCreator(file);

            cv.FilePath    = pathCreator.fileName;
            cv.CreatedDate = DateTime.Now;
            cv.UpdatedDate = DateTime.Now;
            cv.Status      = true;
            FileHelper.Add(file, pathCreator.path);
            _curriculumVitaeDal.Add(cv);
            return(new SuccessResult(Messages.CurriculumVitae.AddSuccess));
        }