Example #1
0
        private NewCommandResponse CreateCommandCore(NewCommandRequest request)
        {
            var entity = new Command
            {
                ClientId    = request.ClientId,
                CommandText = request.CommandText,
                Parameters  = request.CommandParameters
            };

            _model.Command.Add(entity);
            _model.SaveChanges();
            return(new NewCommandResponse {
                CommandId = entity.Id
            });
        }
Example #2
0
 public NewCommandResponse CreateCommand(NewCommandRequest request)
 {
     return(this.HandleAndReturn(request, CreateCommandCore));
 }
 public NewCommandResponse Create(NewCommandRequest request)
 {
     return(_commandService.CreateCommand(request));
 }