public async Task <InvokedResult> AddLogAsync(OperationLogStatus status, string orderId)
        {
            var log = Create(status, orderId, status.GetDisplayName());

            DbContext.Set <OrderOperationLog>().Add(log);
            await DbContext.SaveChangesAsync();

            return(InvokedResult.SucceededResult);
        }
 private OrderOperationLog Create(OperationLogStatus status, string orderId, string content)
 {
     return(new OrderOperationLog
     {
         Content = content,
         Created = DateTime.Now,
         CreatorId = User.Id,
         CreatorName = User.Name,
         Status = status,
         OrderId = orderId
     });
 }