public string GetRowKeyAsString(DbSetInfo dbSetInfo) { FieldInfo[] finfos = DataHelper.GetPKFieldInfos(dbSetInfo); string[] vals = new string[finfos.Length]; for (int i = 0; i < finfos.Length; ++i) { ValueChange fv = this.GetValue(finfos[i].fieldName); vals[i] = fv.val; } return(string.Join(";", vals)); }
public object[] GetPKValues() { Type entityType = this.dbSetInfo.EntityType; FieldInfo[] finfos = DataHelper.GetPKFieldInfos(this.dbSetInfo); object[] result = new object[finfos.Length]; for (int i = 0; i < finfos.Length; ++i) { ValueChange fv = this.GetValue(finfos[i].fieldName); result[i] = fv.GetTypedValue(entityType, this.dbSetInfo); } return(result); }
public ValueChange GetValue(string fieldName) { ValueChange fv = this.values.Single(v => v.fieldName == fieldName); return(fv); }