私はこのコードを持っています:
public class TrainingModuleProgressStateDataModelResults
{
public IEnumerable<DataModels.Training.TrainingModuleProgressStateDataModel> TrainingModuleProgressStates { get; set; }
}
public class TrainingModuleProgressStateDataModel
{
public IEnumerable<UserTrainingPointsDataModel> UserTrainingPoints { get; set; }
}
これを次のように分割する必要があります。
public class UserTrainingPointsDataModel
{
public virtual int InteractionType { get; set; }
public virtual int Points { get; set; }
public virtual string Name { get; set; }
}
私のリポジトリでは、次のデータベースから戻ってきますRawPoints
:
China Incentive Program,50,6,1|India - Q2 Incentive ,50,6,4|China - Q2 Incentive,50,6,5|India Incentive Program,100,8,3|India - Q2 Incentive ,100,8,4
各セットは で区切られ、pipe character
は50 = the points,6
インタラクション タイプで1
あり、trainingmoduleid です (これはもう必要ありません)。name はまあ、name :)
string RawPoints = row["RawPoints"].ToString();
foreach (var RawPoint in RawPoints)
{
UserTrainingPointsDataModel.Name = RawPoints.Name;???
}