/// <summary> /// Create new record. /// </summary> /// <param name="command">Parameters command.</param> public override void Handle(AppCommandRequest command) { if (this.GoToNextCommand(command)) { return; } int id; DataRecord dataRecord = DataRecord.CollectRecordData(this.service); try { id = this.service.CreateRecord(dataRecord); Console.WriteLine($"Record #{id} is created."); } catch (ArgumentException ex) { Console.WriteLine(ex.Message); } }