public bool UpdateFreelancerEducation(FREELANCER_EDUCATION_INFO_Model entity)
 {
     if (entity != null)
     {
         var data = Mapper.Map <FREELANCER_EDUCATION_INFO_Model, FREELANCER_EDUCATION_INFO>(entity);
         return(_iFreelancerEducationInfoRepository.Update(data));
     }
     return(false);
 }
 public ActionResult Edit([Bind(Include = "Id,Freelancer_Id,Degree,Institute,Year,Result,Subject")] FREELANCER_EDUCATION_INFO_Model fREELANCER_EDUCATION_INFO_Model)
 {
     if (ModelState.IsValid)
     {
         if (_iFreelancerEducationInfoService.UpdateFreelancerEducation(fREELANCER_EDUCATION_INFO_Model))
         {
             return(RedirectToAction("Index"));
         }
     }
     return(View(fREELANCER_EDUCATION_INFO_Model));
 }
        public ActionResult Create([Bind(Include = "Id,Freelancer_Id,Degree,Institute,Year,Result,Subject")] FREELANCER_EDUCATION_INFO_Model fREELANCER_EDUCATION_INFO_Model)
        {
            if (ModelState.IsValid)
            {
                fREELANCER_EDUCATION_INFO_Model.Freelancer_Id = User.Identity.GetUserId();
                if (_iFreelancerEducationInfoService.InsertFreelancerEducation(fREELANCER_EDUCATION_INFO_Model))
                {
                    ;
                }
                {
                    return(RedirectToAction("Index"));
                }
            }

            return(View(fREELANCER_EDUCATION_INFO_Model));
        }
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            if (User.Identity.GetUserId() == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            FREELANCER_EDUCATION_INFO_Model fREELANCER_EDUCATION_INFO_Model = _iFreelancerEducationInfoService.GetById(id);

            if (fREELANCER_EDUCATION_INFO_Model == null)
            {
                return(HttpNotFound());
            }
            return(View(fREELANCER_EDUCATION_INFO_Model));
        }