Esempio n. 1
0
        public ResponseModel Delete(TestRequestModel model)
        {
            _data.RemoveAt(model.Id);

            return(new ResponseModel {
                StatusCode = HttpStatusCode.NoContent
            });
        }
Esempio n. 2
0
        public ResponseModel Post(TestRequestModel model)
        {
            _data.Add(new TestResponseModel(model.Value));

            return(new ResponseModel {
                StatusCode = HttpStatusCode.Created
            });
        }
Esempio n. 3
0
        public Task <ResponseModel> Delete(TestRequestModel model)
        {
            _data.RemoveAt(model.Id);

            return(Task.FromResult(new ResponseModel {
                StatusCode = HttpStatusCode.NoContent
            }));
        }
Esempio n. 4
0
        public Task <ResponseModel> Post(TestRequestModel model)
        {
            _data.Add(new TestResponseModel(model.Value));

            return(Task.FromResult(new ResponseModel {
                StatusCode = HttpStatusCode.Created
            }));
        }
Esempio n. 5
0
        public ResponseModel Put(TestRequestModel model)
        {
            _data[model.Id].Name = model.Value;

            return(_data[model.Id].CreateResponse());
        }
Esempio n. 6
0
 public ResponseModel Get(TestRequestModel model)
 {
     return(_data[model.Id].CreateResponse());
 }
Esempio n. 7
0
        public Task <ResponseModel> Put(TestRequestModel model)
        {
            _data[model.Id].Name = model.Value;

            return(Task.FromResult(_data[model.Id].CreateResponse()));
        }
Esempio n. 8
0
 public Task <ResponseModel> Get(TestRequestModel model)
 {
     return(Task.FromResult(_data[model.Id].CreateResponse()));
 }