<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dooba.net &#187; Linq</title>
	<atom:link href="http://dooba.net/category/code/linq/feed/" rel="self" type="application/rss+xml" />
	<link>http://dooba.net</link>
	<description>Tech, Science, Insanity</description>
	<lastBuildDate>Thu, 09 Sep 2010 03:09:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>LINQPad beyond Linq</title>
		<link>http://dooba.net/2010/09/09/linqpad-beyond-linq/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=linqpad-beyond-linq</link>
		<comments>http://dooba.net/2010/09/09/linqpad-beyond-linq/#comments</comments>
		<pubDate>Thu, 09 Sep 2010 02:35:25 +0000</pubDate>
		<dc:creator>Markis</dc:creator>
				<category><![CDATA[Linq]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[Linqpad]]></category>

		<guid isPermaLink="false">http://dooba.net/2010/09/09/linqpad-beyond-linq/</guid>
		<description><![CDATA[LINQPad is a great way to learn Linq, but there is plenty of information on their site about that: http://linqpad.net/.  And I don&#8217;t need to rehash all the information on their site.  Instead, I would like to talk about the ways LINQPad can be used beyond that.  I am also going to assume you know [...]]]></description>
			<content:encoded><![CDATA[<p>LINQPad is a great way to learn Linq, but there is plenty of information on their site about that: <a href="http://linqpad.net/">http://linqpad.net/</a>.  And I don&#8217;t need to rehash all the information on their site.  Instead, I would like to talk about the ways LINQPad can be used beyond that.  I am also going to assume you know about the Dump function native to LINQPad and general understanding of LINQPad.</p>
<h3>Using LINQPad to Test simple .NET Functions</h3>
<p>LINQPad can be used to test any .NET function.  Simply type in the .NET<br />
<a href="http://dooba.net/wp-content/uploads/2010/09/image.png"><img style="display: inline; border-width: 0px;" title="image" src="http://dooba.net/wp-content/uploads/2010/09/image_thumb.png" border="0" alt="image" width="536" height="367" /></a></p>
<h3>Using LINQPad to test ASMX Web Services</h3>
<p>Generate the SOAP client &#8211; open “Visual Studio Command Prompt” and run “WSDL &lt;url&gt;”</p>
<p><a href="http://dooba.net/wp-content/uploads/2010/09/image1.png"><img style="display: inline; border-width: 0px;" title="image" src="http://dooba.net/wp-content/uploads/2010/09/image_thumb1.png" border="0" alt="image" width="535" height="272" /></a></p>
<p>Compile the SOAP client &#8211; run “csc /t:library &lt;filename generated in previous step&gt;”</p>
<p><a href="http://dooba.net/wp-content/uploads/2010/09/image2.png"><img style="display: inline; border-width: 0px;" title="image" src="http://dooba.net/wp-content/uploads/2010/09/image_thumb2.png" border="0" alt="image" width="536" height="273" /></a></p>
<p>Add the correct references in LINQPad, one to the library we just created and one to System.Web.Services.dll</p>
<p><a href="http://dooba.net/wp-content/uploads/2010/09/image3.png"><img style="display: inline; border-width: 0px;" title="image" src="http://dooba.net/wp-content/uploads/2010/09/image_thumb3.png" border="0" alt="image" width="536" height="365" /></a></p>
<p>Type the necessary code to call the web service, just as you would have normally in Visual Studio</p>
<p><a href="http://dooba.net/wp-content/uploads/2010/09/image4.png"><img style="display: inline; border-width: 0px;" title="image" src="http://dooba.net/wp-content/uploads/2010/09/image_thumb4.png" border="0" alt="image" width="535" height="367" /></a></p>
<h3>Using LINQPad to call a WCF Service</h3>
<p>Generate the client &#8211; open “Visual Studio Command Prompt” and run “SVCUTIL /config:&lt;path to LINQPad’s config file&gt; /mergeConfig &lt;url&gt;”<br />
Note that this will generate the client and will add the necessary settings in LINQPad’s config file</p>
<p><a href="http://dooba.net/wp-content/uploads/2010/09/image5.png"><img style="display: inline; border-width: 0px;" title="image" src="http://dooba.net/wp-content/uploads/2010/09/image_thumb5.png" border="0" alt="image" width="532" height="270" /></a></p>
<p>Compile the client – run “csc /t:library &lt;code file generated in previous step&gt;”</p>
<p><a href="http://dooba.net/wp-content/uploads/2010/09/image6.png"><img style="display: inline; border-width: 0px;" title="image" src="http://dooba.net/wp-content/uploads/2010/09/image_thumb6.png" border="0" alt="image" width="535" height="272" /></a></p>
<p>Add the correct references in LINQPad, one to the library we just created and one to System.ServiceModel.dll</p>
<p><a href="http://dooba.net/wp-content/uploads/2010/09/image7.png"><img style="display: inline; border-width: 0px;" title="image" src="http://dooba.net/wp-content/uploads/2010/09/image_thumb7.png" border="0" alt="image" width="533" height="364" /></a></p>
<p>Add the follow code and make adjustments as necessary</p>
<blockquote><p>var endpoint = new System.ServiceModel.EndpointAddress(&#8220;<a href="http://www.ecubicle.net/gsearch_rss.asmx&quot;);">http://www.ecubicle.net/gsearch_rss.asmx&#8221;);</a><br />
var binding = new System.ServiceModel.BasicHttpBinding();<br />
var oProxy = System.ServiceModel.ChannelFactory&lt;gsearch_rssSoapChannel&gt;.CreateChannel(binding, endpoint);</p>
<p>/* Code specific to service */<br />
var request = new GetSearchResultsRequest() { Body = new GetSearchResultsRequestBody() };<br />
request.Body.searchPage = &#8220;&#8221;;<br />
request.Body.gQuery = &#8220;Test&#8221;;<br />
request.Body.numOfResults = &#8220;50&#8243;;</p>
<p>bool successfulCall = false;<br />
try<br />
{<br />
/* Service Call */<br />
oProxy.GetSearchResults(request).Dump();<br />
oProxy.Close();<br />
successfulCall = true;<br />
}<br />
finally<br />
{<br />
if (!successfulCall)<br />
{<br />
oProxy.Abort();<br />
}<br />
}</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://dooba.net/2010/09/09/linqpad-beyond-linq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning LINQ</title>
		<link>http://dooba.net/2009/11/05/learning-linq/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=learning-linq</link>
		<comments>http://dooba.net/2009/11/05/learning-linq/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 14:52:36 +0000</pubDate>
		<dc:creator>Markis</dc:creator>
				<category><![CDATA[Linq]]></category>
		<category><![CDATA[Linqpad]]></category>

		<guid isPermaLink="false">http://dooba.net/?p=209</guid>
		<description><![CDATA[LINQPad is a great tool to test linq queries. http://www.linqpad.net   And the 101 samples from msdn is a great place to get started in learning LINQ.   C# http://msdn.microsoft.com/en-us/vcsharp/aa336746.aspx VB http://msdn.microsoft.com/en-us/vbasic/bb688088.aspx]]></description>
			<content:encoded><![CDATA[<div>
<div>LINQPad is a great tool to test linq queries.</div>
<p><a href="http://www.linqpad.net/">http://www.linqpad.net</a></p>
<div> </div>
<div>And the 101 samples from msdn is a great place to get started in learning LINQ.</div>
<div> </div>
<div>C#</div>
<div><a href="http://msdn.microsoft.com/en-us/vcsharp/aa336746.aspx">http://msdn.microsoft.com/en-us/vcsharp/aa336746.aspx</a><br />
VB</div>
<div><a href="http://msdn.microsoft.com/en-us/vbasic/bb688088.aspx">http://msdn.microsoft.com/en-us/vbasic/bb688088.aspx</a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://dooba.net/2009/11/05/learning-linq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
