public ActionProxy GetProxy()
        {
            ActionProxy result = new ActionProxy();

            result.ImportFileID      = this.ImportFileID;
            result.IsClean           = this.IsClean;
            result.Description       = this.Description;
            result.Pinned            = this.Pinned;
            result.JiraID            = this.JiraID;
            result.SalesForceID      = this.SalesForceID;
            result.ActionSource      = this.ActionSource;
            result.TicketID          = this.TicketID;
            result.ModifierID        = this.ModifierID;
            result.CreatorID         = this.CreatorID;
            result.ImportID          = this.ImportID;
            result.IsKnowledgeBase   = this.IsKnowledgeBase;
            result.IsVisibleOnPortal = this.IsVisibleOnPortal;
            result.TimeSpent         = this.TimeSpent;
            result.Name = this.Name;
            result.SystemActionTypeID = this.SystemActionTypeID;
            result.ActionTypeID       = this.ActionTypeID;
            result.ActionID           = this.ActionID;

            result.DateCreated  = DateTime.SpecifyKind(this.DateCreatedUtc, DateTimeKind.Utc);
            result.DateModified = DateTime.SpecifyKind(this.DateModifiedUtc, DateTimeKind.Utc);

            result.DateModifiedByJiraSync       = this.DateModifiedByJiraSyncUtc == null ? this.DateModifiedByJiraSyncUtc : DateTime.SpecifyKind((DateTime)this.DateModifiedByJiraSyncUtc, DateTimeKind.Utc);
            result.DateModifiedBySalesForceSync = this.DateModifiedBySalesForceSyncUtc == null ? this.DateModifiedBySalesForceSyncUtc : DateTime.SpecifyKind((DateTime)this.DateModifiedBySalesForceSyncUtc, DateTimeKind.Utc);
            result.DateStarted = this.DateStartedUtc == null ? this.DateStartedUtc : DateTime.SpecifyKind((DateTime)this.DateStartedUtc, DateTimeKind.Utc);

            return(result);
        }
        // extracted from ts-app\WebApp\App_Code\TicketPageService.cs UpdateAction() AND
        // also extracted from ts-app\webapp\app_code\ticketservice.cs
        public static void Create(DataContext db, int organizationID, int userID, int ticketID, ref ActionProxy actionProxy)
        {
            Action action = new Actions(new LoginUser(userID, organizationID)).AddNewAction();

            action.TicketID           = ticketID;
            action.CreatorID          = userID;
            action.Description        = actionProxy.Description;
            action.SystemActionTypeID = actionProxy.SystemActionTypeID;
            if (!String.IsNullOrEmpty(actionProxy.Name))
            {
                action.Name = actionProxy.Name;
            }

            // add signature?
            string signature = db.ExecuteQuery <string>($"SELECT [Signature] FROM Users WITH (NOLOCK) WHERE UserID={userID} AND OrganizationID={organizationID}").FirstOrDefault();

            if (!string.IsNullOrWhiteSpace(signature) && actionProxy.IsVisibleOnPortal && !actionProxy.IsKnowledgeBase && !actionProxy.Description.Contains(signature))
            {
                action.Description += "<br/><br/>" + signature;
            }

            action.ActionSource      = actionProxy.ActionSource;
            action.ActionTypeID      = actionProxy.ActionTypeID;
            action.DateStarted       = actionProxy.DateStarted;
            action.TimeSpent         = actionProxy.TimeSpent;
            action.IsKnowledgeBase   = actionProxy.IsKnowledgeBase;
            action.IsVisibleOnPortal = actionProxy.IsVisibleOnPortal;
            action.Collection.Save();
            actionProxy = action.GetProxy();
        }