public IEnumerable<thisclass> getplistid(int id) { IList<thisclass> t = new List<thisclass>(); var sp = 商品管理.列表商品(0, 3, Fields<商品>.Include(o => o.Id, o => o.商品信息.商品名, o => o.销售信息.价格)); foreach (var s in sp) { thisclass ti = new thisclass(); ti.id = long.Parse(s["_id"].ToString()); ti.name = s["商品信息"]["商品名"].ToString(); ti.price = decimal.Parse(s["销售信息"]["价格"].ToString()); t.Add(ti); } return t; }
public IList<thisclass> getaaa() { IList<thisclass> tl = new List<thisclass>(); thisclass t = new thisclass() { id = 1, name = null, price = 1 }; tl.Add(t); return tl; }