public static IActionResult AsActionResult <T>(this OperationResult <T> operation, bool?internalFlag = null)
        {
            var actionBuilder = new GenericActionBuilder <T>(operation);

            if (internalFlag.HasValue)
            {
                actionBuilder.WithInternalFlag(internalFlag.Value);
            }
            return(actionBuilder.Execute());
        }
        public static async Task <IActionResult> AsActionResultAsync <T>(this Task <OperationResult <T> > operationTask, bool?internalFlag = null)
        {
            var actionBuilder = new GenericActionBuilder <T>(operationTask);

            if (internalFlag.HasValue)
            {
                actionBuilder.WithInternalFlag(internalFlag.Value);
            }
            return(await actionBuilder.ExecuteAsync());
        }