public HttpResponseMessage Add(EducationLevelAddRequest model) { if (!ModelState.IsValid) { return(Request.CreateResponse(HttpStatusCode.BadRequest, ModelState)); } ItemResponse <int> response = new ItemResponse <int>(); response.Item = _educationLevelService.Add(model); return(Request.CreateResponse(HttpStatusCode.OK, response)); }
public IActionResult Post([FromBody] EducationLevelAddDto value) { _educationLevelService.Add(value); return(Ok()); }