Exemple #1
0
        public HttpResponseMessage Delete(int id)
        {
            LanguageProficiencyService.Delete(id);

            SuccessResponse _response = new SuccessResponse();

            return(Request.CreateResponse(HttpStatusCode.OK, _response));
        }
Exemple #2
0
        public HttpResponseMessage SelectAll()
        {
            ItemsResponse <LanguageProficiency> response = new ItemsResponse <LanguageProficiency>();

            response.Items = LanguageProficiencyService.SelectAll();

            return(Request.CreateResponse(HttpStatusCode.OK, response));
        }
Exemple #3
0
        public HttpResponseMessage SelectById(int id)
        {
            ItemResponse <LanguageProficiency> _response = new ItemResponse <LanguageProficiency>();

            _response.Item = LanguageProficiencyService.SelectById(id);

            return(Request.CreateResponse(HttpStatusCode.OK, _response));
        }
Exemple #4
0
        public HttpResponseMessage Update(LanguageProficiencyUpdateRequest model)
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }
            LanguageProficiencyService.Update(model);
            SuccessResponse _response = new SuccessResponse();

            return(Request.CreateResponse(HttpStatusCode.OK, _response));
        }
Exemple #5
0
        public HttpResponseMessage Add(LanguageProficiencyAddRequest model)
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }
            ItemResponse <int> _response = new ItemResponse <int>();

            _response.Item = LanguageProficiencyService.Insert(model);
            return(Request.CreateResponse(HttpStatusCode.OK, _response));
        }
Exemple #6
0
 public void TestInit()
 {
     context = new TestEcaContext();
     languageProficiencyService = new LanguageProficiencyService(context);
 }