public async Task <IHttpActionResult> Update([FromBody] ProductAttributeMappingDTO ProductAttributeMappingDto) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var entity = await ProductAttributeMappingService.FindOneAsync(ProductAttributeMappingDto.Id); entity = ProductAttributeMappingDto.ToEntity(entity); await ProductAttributeMappingService.UpdateAsync(entity); return(Ok(entity.ToModel())); }