public IActionResult Put(Guid id, [FromBody] MISAEntity entity) { //customer.CustomerId = id; var properties = typeof(MISAEntity).GetProperties(); var tableName = typeof(MISAEntity).Name; foreach (var item in properties) { if (item.Name == $"{tableName}id") { item.SetValue(entity, id); } } var rowsAffect = _dataAccessBaseServices.Put(entity); if (rowsAffect > 0) { return(Ok(rowsAffect)); } else { return(NoContent()); } }