linq - How do I use LinqPad for updates with CRM 2011 -
i working linqpad , crm 2011, cloud version, , c# snippets. simple select queries work advertised. nonetheless linqpad of real use need updates , inserts , have not been able find sample code works or come real information. several kinds of things show in sample code see around net missing. in particular, testdatacontext appears part of 1 or more assemblies loaded linq-sql projects in visual studio, not in evidence on linqpad. submitchanges not there, , not clear i'd have @ or instantiate new datacontext object , try use submitchanges method.
any usable information appreciated.
well don't know crm 2011 linq implementation. linqpad have direct support that?
anyway, can run c# code in linqpad. here's step-by-step guide how run needed code:
- you need add required framework assemblies (maybe take @ visual studio project). achieve this, go ‘query’->’advanced query properties’. on dialog, click on ‘add…’, on ‘browse…’. browse assemblies. add required assemblies. keep ‘advanced query properties’-dialog open next step. optinally add own assemblies when use types it.
- in ‘advanced query properties’-dialog go tab ‘additional namespace imports’. add there namespaces need. expecially linq-namespaces of linq-provider.
- click on ‘set default new queries’ don’t need repeat 3 steps above next time. we’re done.
- now can use linq-provider in linq-pad. use 'c#-statements'-language. use .dump-method view query results.
now steps can use api in linqpad. can loops , use regular api update objects.
Comments
Post a Comment