I'm not sure what class your Context
is referring to, but here's some code to give you the idea of how to get the property name and values:
public static void saveAllFiles(Context context)
{
var objectTypes = new List<Type> {typeof (int), typeof (string)};
foreach(Type objectType in objectTypes)
{
var properties = objectType.GetProperties(BindingFlags.Instance | BindingFlags.Public);
var dataSetObjects = context.Set(objectType);
foreach(var dataSetObject in dataSetObjects)
{
foreach( var property in properties )
{
var value = property.GetValue(dataSetObject);
var name = property.Name;
}
}
}
}