c# - How can I cast to IEnumerable in simple.data? -
i have query in simple.data
var db = database.open(); ienumerable<guid> recetas = db.factura .all() .where(db.factura.obrasocialplan_id == obrasocialplanid) .select(db.factura.id) .cast<guid>();
and i'm getting
cannot implicitly convert type
'simple.data.simplerecord'
'system.guid'
how should change query?
you can't enumerable, can materialise list this:
var db = database.open(); ienumerable<guid> recetas = db.factura .all() .where(db.factura.obrasocialplan_id == obrasocialplanid) .select(db.factura.id) .toscalarlist<guid>();
if want laziness, can pass enumerable somewhere without having run query, please raise issue on github page: http://github.com/markrendle/simple.data/issues
thanks.
Comments
Post a Comment