public object Put(JObject updatedJSON) { object json; try { IDictionary <String, object> updated = updatedJSON.ToObject <IDictionary <String, object> >(); User currentUser = UsersManager.GetCurrentUser(Request); string messageError = ""; Document putting = repository.Update(updated, currentUser, ref messageError); if (putting != null) { json = new { total = 1, data = putting, success = true }; } else { json = new { message = messageError, success = false }; } } catch (Exception ex) { LogManager.Write("ERROR:" + Environment.NewLine + "\tMETHOD = " + this.GetType().FullName + "." + MethodBase.GetCurrentMethod().Name + Environment.NewLine + "\tMESSAGE = " + ex.Message); json = new { message = ex.Message, success = false }; }; return(json); }
public void UpdateDocumentsPivot(DocumentsPivot Documents) { documentsRepository.Update(Documents.Id, Mapper.Map <DocumentsPivot, GEN_Documents>(Documents)); }