Exemple #1
0
        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;
            }
        }
Exemple #2
0
 public IActionResult Update(MISAEntity entity)
 {
     return(Ok(_baseServices.Update(entity)));
 }
Exemple #3
0
 public async Task <bool> Update(T model)
 {
     return(await baseDal.Update(model));
 }