silverlight 4.0 - Using the return type IQueryable<TABLE_1> -
i new silverlight, many posts indicate using observablecollection best.
domainservice1 returns iqueryable type.
how work return type in silverlight side?
how convert/cast data returned observable collection?
the domainservices1.cs
public iqueryable<table_1> gettable_1() { return this.objectcontext.table_1; }
*the home.xaml.cs***
public home() { initializecomponent(); this.title = applicationstrings.homepagetitle; web.domainservice1 dservice = new web.domainservice1(); entityquery<web.table_1> query=new entityquery<web.table_1>(); query = dservice.gettable_1query(); //convert result observablecollection //bind grid item source }
the iqueryable not return results until enumerate collection. instance if wanted limit results of dservice.gettable_1query .where() could...
to object observable collection .tolist query this
observablecollection<table1> t=new observablecollection<table1>(query.tolist());
i think there little more have do(a loadoperation how mine) in learning stages of linq dynamic, other applications have had convert returned results observable collection; how did it. wrote exension .toobservablecollection
Comments
Post a Comment