public IActionResult Put(Guid entityId, [FromBody] MISAEntity entity) { var properties = typeof(MISAEntity).GetProperties(); foreach (var item in properties) { var propertyName = item.Name; if (propertyName == $"{tableName}Id") { item.SetValue(entity, entityId); } } try { var rowAffects = _baseServices.Update(entity); if (rowAffects > 0) { return(Ok(entity)); } else { return(NoContent()); } } catch (Exception) { throw; } }
public IActionResult Update(MISAEntity entity) { return(Ok(_baseServices.Update(entity))); }
public async Task <bool> Update(T model) { return(await baseDal.Update(model)); }