Dorado EntityState
程序员文章站
2022-07-03 23:33:58
...
实体数据的状态
可转换为数字
public static int toInt(EntityState state) {
if (state == NONE) {
return 0;
}
if (state == NEW) {
return 1;
}
if (state == MODIFIED) {
return 2;
}
if (state == DELETED) {
return 3;
}
if (state == MOVED) {
return 4;
}
return 0;
}
public static EntityState fromInt(int i) {
switch (i) {
case 0:
return NONE;
case 1:
return NEW;
case 2:
return MODIFIED;
case 3:
return DELETED;
case 4:
return MOVED;
default:
return NONE;
}
}
上一篇: linq小笔记;
下一篇: dorado DoradoContext