public void Post([FromBody] CategoryModel Category) { int PostId = Category.PostId; Category.PostId = new int(); PostLogic.AddCategory(PostId, CategoryControllerMapper.Map <CategoryModel, CategoryDTO>(Category)); }
// PUT api/<controller>/5 public void Put(int PostId, [FromBody] CategoryModel Category) { PostLogic.AddCategory(PostId, PostControllerMapper.Map <CategoryModel, CategoryDTO>(Category)); }