public ActionResponseId Store([FromBody] ActionRequestStoreDocument action) { var session = Program.Core.Sessions.GetSession(action.SessionId); Thread.CurrentThread.Name = $"API:{session.InstanceKey}:{Utility.GetCurrentMethod()}"; Program.Core.Log.Trace(Thread.CurrentThread.Name); var result = new ActionResponseId(); try { Guid newId = Guid.Empty; Program.Core.Documents.Store(session, action.SchemaName, action.Object, out newId); result.Id = newId; result.Success = true; } catch (Exception ex) { result.Message = ex.Message; } return(result); }
public void Store(string schema, Payloads.Models.Document document) { var action = new ActionRequestStoreDocument(client.Token.SessionId) { SchemaName = schema, Object = document }; Submit <ActionRequestStoreDocument, ActionResponseBase>("api/Document/Store", action); }