public async Task<IActionResult> UpdateUrun(UrunResource urunResource, int id) { if (!ModelState.IsValid) { return BadRequest(ModelState.GetErrorMessage()); } else { Urun urun = mapper.Map<UrunResource, Urun>(urunResource); UrunResponse urunResponse = await urunService.UpdateAsync(urun, id); if (urunResponse.Success) { return Ok(urunResponse.Success); } else { return BadRequest(urunResponse.Message); } } }