Use static and dynamic data contexts in conjunction

  • Digg
  • Facebook
  • LinkedIn
  • Twitter
 


Linq to Dynamics CRM is now certified!
Update will be available on the 24th of October.

Thanks Ian for coming up with this neat feature. You can now write queries that take advantage of the static and dynamic data context at the same time giving you more freedom and control.

Lets take a look at an example

var leadAccounts = (from l in this.CrmDataContext.Leads
                    join a in this.CrmDataContext["account"] 
                           on l.CompanyName equals a.Attribute<string>("name")
 
                    orderby a.Attribute<string>("name")
 
                    select new
                    {
                         Topic = l.Subject,
                         AccountName = a.Attribute<string>("name")
 
                    }).Skip(10).Take(10).ToList();

As you can see from the above example, you can join on any type of attribute, it doesn’t have to be uniqueidentifier to uniqueidentifier.

We would love to hear your feedback and ideas, email support@xrmlinq.com anytime!

No Feedback

No feedback yet.

RSS feed for feedback on this post. TrackBack URI

Leave your feedback

© XrmLinq 2009.