You can use reflection to set the properties 'by name'.
using System.Reflection;
...
myCustomer.GetType().GetProperty(item.Key).SetValue(myCustomer, item.Value, null);
You can also read the properties with GetValue, or get a list of all property names using GetType().GetProperties(), which returns an array of PropertyInfo (the Name property contains the properties name)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…