Inheritance: BaseObject
Exemplo n.º 1
0
 public Education Update(Education education)
 {
     using (var svc = new ServiceProxyHelper<IEducationService>("EducationService"))
     {
         return svc.Proxy.Update(education);
     }
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 3
0
        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);
            }
        }
Exemplo n.º 4
0
        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);
            }
        }
Exemplo n.º 5
0
 public Education Update(Education education)
 {
     return _educationLogic.Update(education);
 }
Exemplo n.º 6
0
 public Education Add(Education education)
 {
     return _educationLogic.Add(education);
 }
 public Education Update(Education education, string authenticationToken)
 {
     throw new System.NotImplementedException();
 }