public void Update(Tentity entity, params string[] fields) { var attack = context.Attach(entity); foreach (var field in fields) { if (entity.GetType().GetProperty(field) != null)//geçersiz bir { attack.Property(field).IsModified = true; } else { throw new Exception($"{field} is not a property of " + entity.GetType().Name); } } }