我的第一个想法是扩展部分类'Step',它是一个实体。我可以添加一个bool属性然后设置为true / false,因为我完成了对它们的处理..但是每次我在更改DB后重新生成DBContext都不会手动继续这样做吗?或者是其他方式..下面的代码解释了我想要做的事情
if ((si.StepID == 20) || (si.StepID == 23) || (si.StepID == 24))
{
//Step is a process. Each Step must be run in order
//get list of steps in tasks in RUN (1,2,3,4...) order
int stepToRun = 0;
var stepsInTask = InstanceExpert.GetAllStepsInTaskOrderedByRunOrder(ti.TaskInstanceID);
//Get which step is next to be processed
foreach (Step s in stepsInTask)
{
//get the stepToRun
//Need to extend STEP Entity property with a bool??
}
//Take that step and run the specific function
if (stepToRun == 20)
{
}
if (stepToRun == 23)
{
}
if (stepToRun == 24)
{
}