private EntityRecordModel BuildModelFromDbObj(DbObject dbObj) //InvariantDictionary<IEnumerable<DbObject>> relatedFieldData { var model = new EntityRecordModel(this); // foreach(var fData in relatedFieldData) // { // dbObj.Add(fData.Key + "__data", fData.Value); // } model.BuiltWithDB(dbObj); return(model); }
public List <EntityModelBase> GetAll(StackAppContext appContext, int[] ids) { var sql = _detailQry; var arr = DBService.Query(sql, new { ItemId = ids }); var list = new List <EntityModelBase>(); if (arr.Count() > 0) { foreach (var a in arr) { var model = new EntityRecordModel(this); model.BuiltWithDB(a); list.Add(model); } } return(list); }