public ActionResultDTO Put(int id, ImageEntity image) { image.Id = id; var result = _imageServices.UpdateImage(image); if (result == null) { throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotFound)); } if (result.Success) { _auditLog.AuditType = AuditEntry.Type.Update; _auditLog.ObjectId = result.Id; _auditLog.ObjectName = image.Name; _auditLog.Ip = Request.GetClientIpAddress(); _auditLog.ObjectJson = JsonConvert.SerializeObject(image); _auditLogService.AddAuditLog(_auditLog); } return(result); }