public static Command GetCommand()
 {
     Command res = new Command();
     res.Name = "GeneratedCommand" + RandomIntModifier();
     res.Text = "command_text_" + RandomIntModifier();
     return res;
 }
 public static CommandLog GetFilledCommandLog(Command comm = null, Token tok = null)
 {
     CommandLog comL = EntityGenerator.GetCommandLog();
     if (comm == null)
         comm = GetFilledCommand();
     if (tok == null)
         tok = GetFilledToken();
     comL.Command = comm;
     comL.Token = tok;
     commLogRep.Save(comL);
     return comL;
 }
        public CommandParameterDTO[] Params { get; set; } //not possible to do with lower case.
        public static CommandDTO Convert(Command from)
        {
            CommandDTO res = new CommandDTO();
            res.Id = from.Id;
            res.Name = from.Name;
            res.Text = from.Text;

            int size = new Random().Next(1,3);
            res.Params = new Random().Next() % 3 == 0 ? null : new CommandParameterDTO[size];
            if (res.Params != null)
            {
                for (int i = 0; i < size; i++)
                    res.Params[i] = new CommandParameterDTO();
            }
            return res;            
        }
 public System.Net.HttpStatusCode editCommand(Command command)
 {
     //dummy command validation
     //dummy update
     throw new NotImplementedException();
 }