protected void Create() { Logger.Info($"Creating a new statement: {StatementModel.Name}"); if (string.IsNullOrEmpty(StatementModel.Name)) { Logger.Warn("Statement not created, command name is null or empty."); return; } var scriptCommand = new ScriptStatement { Name = StatementModel.Name, Param1 = StatementModel.Param1, Param2 = StatementModel.Param2 }; ScriptService.Add(scriptCommand); Statements.Add(scriptCommand); InvokeAsync(StateHasChanged); }