Inheritance: BaseObject
 public Education Update(Education education)
 {
     using (var svc = new ServiceProxyHelper<IEducationService>("EducationService"))
     {
         return svc.Proxy.Update(education);
     }
 }
Example #2
0
 public Education Update(Education education)
 {
     try
     {
         return EducationMapper.ToDto(_educationRepository.Edit(EducationMapper.ToEntity(education)));
     }
     catch (Exception ex)
     {
         throw new BlogException(ex.Message, ex.InnerException);
     }
 }
        public ActionResult Edit(Education education)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    return Json(GetErrorList(ModelState));
                }

                var result = _educationResource.Update(education);
                if (result.Error != null) throw new Exception(result.Error.Message);
                return Json(result);
            }
            catch (Exception ex)
            {
                Response.StatusCode = 400;
                _errorSignaler.SignalFromCurrentContext(ex);
                return Json(education);
            }
        }
        public IHttpActionResult Put([FromBody]Education education)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    return BadRequest(ModelState);
                }

                var result = _service.Update(education);
                return Ok(result);
            }
            catch (Exception ex)
            {
                _errorSignaler.SignalFromCurrentContext(ex);
                var errorResult = new Education().GenerateError<Education>((int)Constants.Error.InternalError,
                    "Server technical error");

                return Ok(errorResult);
            }
        }
 public Education Update(Education education)
 {
     return _educationLogic.Update(education);
 }
 public Education Add(Education education)
 {
     return _educationLogic.Add(education);
 }
 public Education Update(Education education, string authenticationToken)
 {
     throw new System.NotImplementedException();
 }