public async Task<IHttpActionResult> PutProductType(int id, ProductType attribute) { if (!ModelState.IsValid) { return BadRequest(ModelState); } await _manageService.EditEntityAsync(attribute); return StatusCode(HttpStatusCode.NoContent); }
public async Task<IHttpActionResult> PostProductType(ProductType attribute) { await _manageService.AddEntityAsync(attribute); return CreatedAtRoute("ProductType", new { id = attribute.Id }, attribute); }