public HttpResponseMessage Delete(int id) { LanguageProficiencyService.Delete(id); SuccessResponse _response = new SuccessResponse(); return(Request.CreateResponse(HttpStatusCode.OK, _response)); }
public HttpResponseMessage SelectAll() { ItemsResponse <LanguageProficiency> response = new ItemsResponse <LanguageProficiency>(); response.Items = LanguageProficiencyService.SelectAll(); return(Request.CreateResponse(HttpStatusCode.OK, response)); }
public HttpResponseMessage SelectById(int id) { ItemResponse <LanguageProficiency> _response = new ItemResponse <LanguageProficiency>(); _response.Item = LanguageProficiencyService.SelectById(id); return(Request.CreateResponse(HttpStatusCode.OK, _response)); }
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)); }
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)); }
public void TestInit() { context = new TestEcaContext(); languageProficiencyService = new LanguageProficiencyService(context); }