Unosquare.Labs.EntityFramework.EnterpriseExtensions.Sample.Program.ToggleController.InvokeAsync C# (CSharp) Method

InvokeAsync() public method

public InvokeAsync ( string paramList ) : Task
paramList string
return Task
            public override async Task<bool> InvokeAsync(string paramList)
            {
                OutputInformation("Toggling controller");
                OutputInformation("Test controller will change orders city to 'NYC'");

                if (_context.ContainsController(controller))
                {
                    OutputInformation("Controller is off");
                    _context.RemoveController(controller);
                }
                else
                {
                    OutputInformation("Controller is on");
                    _context.AddController(controller);
                }

                return true;
            }
        }
Program.ToggleController