public int Update <T>(T item) { if (item == null) { throw new ArgumentNullException(nameof(item)); } var sql = _sqlQueryBuilder.UpdateSql <T>(); //Get all the properties value except for the primary key var values = _sqlQueryBuilder.GetColumnsValue <T>(item).Where(x => !x.Key.IsPrimaryKey).Select(x => x.Value) .ToList(); values.Add(_sqlQueryBuilder.GetPrimaryKeyValue(item)); return(Execute(sql, values.ToArray())); }