<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlserver.ro/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>LINQ</title><link>http://sqlserver.ro/forums/28/ShowForum.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Re: primii pasi in linq...</title><link>http://sqlserver.ro/forums/thread/5434.aspx</link><pubDate>Mon, 04 Aug 2008 10:51:19 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:5434</guid><dc:creator>crestinul</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/5434.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=28&amp;PostID=5434</wfw:commentRss><description>&lt;P&gt;multumesc a mers asa:&lt;/P&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;northwindDataContext&lt;/FONT&gt;&lt;FONT size=2&gt; db=&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;northwindDataContext&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;@"Data Source=APASCANU\SQLEXPRESS;Initial Catalog=Northwind;Integrated Security=True"&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;var&lt;/FONT&gt;&lt;FONT size=2&gt; query = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;from&lt;/FONT&gt;&lt;FONT size=2&gt; c &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;in&lt;/FONT&gt;&lt;FONT size=2&gt; db.Customers&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;join&lt;/FONT&gt;&lt;FONT size=2&gt; o &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;in&lt;/FONT&gt;&lt;FONT size=2&gt; db.Orders&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;on&lt;/FONT&gt;&lt;FONT size=2&gt; c.CustomerID &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;equals&lt;/FONT&gt;&lt;FONT size=2&gt; o.CustomerID&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;select&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; { c.CustomerID, c.CompanyName, o.OrderID };&lt;/P&gt;
&lt;P&gt;db.Log = txt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//foreach (var result in query)&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//{&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// rez.WriteLine(result.CustomerID.ToString()+" "+ result.CompanyName.ToString()+ " " +result.OrderID.ToString());&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//}&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;listBox1.DataSource = query.ToList();&lt;/P&gt;
&lt;P&gt;listBox1.DisplayMember = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"CompanyName"&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;
&lt;P&gt;listBox1.ValueMember = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"CustomerID"&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;/FONT&gt;</description></item><item><title>Re: primii pasi in linq...</title><link>http://sqlserver.ro/forums/thread/5433.aspx</link><pubDate>Mon, 04 Aug 2008 10:46:31 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:5433</guid><dc:creator>ignatandrei</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/5433.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=28&amp;PostID=5433</wfw:commentRss><description>ca sa binduiesti nu trebuie sa pui in ienumerable&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; listBox1.DisplayMember = "CompanyName";&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; listBox1.ValueMember = "CustomerID";&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; listBox1.DataSource = query.ToList();&lt;br&gt;&lt;br&gt;</description></item><item><title>Re: primii pasi in linq...</title><link>http://sqlserver.ro/forums/thread/5432.aspx</link><pubDate>Mon, 04 Aug 2008 10:36:25 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:5432</guid><dc:creator>crestinul</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/5432.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=28&amp;PostID=5432</wfw:commentRss><description>&lt;P&gt;Multumesc&lt;/P&gt;
&lt;P&gt;M-am exprimat gresit ,scuze&lt;/P&gt;
&lt;P&gt;Problema mea e urmatoarea&amp;nbsp; asta e query-ul meu:&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;var&lt;/FONT&gt;&lt;FONT size=2&gt; query = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;from&lt;/FONT&gt;&lt;FONT size=2&gt; c &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;in&lt;/FONT&gt;&lt;FONT size=2&gt; db.Customers&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;join&lt;/FONT&gt;&lt;FONT size=2&gt; o &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;in&lt;/FONT&gt;&lt;FONT size=2&gt; db.Orders&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;on&lt;/FONT&gt;&lt;FONT size=2&gt; c.CustomerID &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;equals&lt;/FONT&gt;&lt;FONT size=2&gt; o.CustomerID&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;select&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; { c.CustomerID, c.CompanyName, o.OrderID };&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;Nu stiu cum sa salvez rezultatul query intr-o Ienumerable&amp;lt;source&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;Multumesc&lt;/P&gt;&lt;/FONT&gt;</description></item><item><title>Re: primii pasi in linq...</title><link>http://sqlserver.ro/forums/thread/5431.aspx</link><pubDate>Mon, 04 Aug 2008 10:28:51 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:5431</guid><dc:creator>ignatandrei</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/5431.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=28&amp;PostID=5431</wfw:commentRss><description>seteaza pentru listbox&amp;nbsp; DisplayMember , ValueMember la proprietati ale obiectului si apoi seteaza .DataSource = listamea&lt;br&gt;Verifica si ca lista contine &amp;gt; 0 obiecte&lt;br&gt;&lt;br&gt;</description></item><item><title>Re: primii pasi in linq...</title><link>http://sqlserver.ro/forums/thread/5430.aspx</link><pubDate>Mon, 04 Aug 2008 10:22:35 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:5430</guid><dc:creator>crestinul</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/5430.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=28&amp;PostID=5430</wfw:commentRss><description>&lt;P&gt;stiu asta ca se executa in momentuk accesarii efective colectiei rezultat.&lt;/P&gt;
&lt;P&gt;Am folosit query.toList() sa pun rezutatul intr-o lista.problemae ca nush cum sa binduiesc lista asta de control&lt;/P&gt;
&lt;P&gt;Multumesc&lt;/P&gt;</description></item><item><title>Re: primii pasi in linq...</title><link>http://sqlserver.ro/forums/thread/5429.aspx</link><pubDate>Mon, 04 Aug 2008 09:59:26 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:5429</guid><dc:creator>ignatandrei</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/5429.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=28&amp;PostID=5429</wfw:commentRss><description>greseala frecventa , esti in 90 % din cei care folosesc Linq&lt;br&gt;Avind in vedere ca interogarea se executa nu in momentul scrierii, ci mai tirziu( vezi deferred execution_, cind chiar ceri ceva ( asa se realizeaza , de ex., faptul ca iti poate face un where mai bun din 2 where -uri ) adauga un .ToArray&amp;nbsp; ...&lt;br&gt;Pune SQL Profiler si o sa vezi ca , pina nu chemi ToArray, nu iti face nimic pe BD&lt;br&gt;</description></item><item><title>primii pasi in linq...</title><link>http://sqlserver.ro/forums/thread/5428.aspx</link><pubDate>Mon, 04 Aug 2008 09:22:35 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:5428</guid><dc:creator>crestinul</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/5428.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=28&amp;PostID=5428</wfw:commentRss><description>&lt;P&gt;AM incepout si eu sa ma joc cu linq si am vrut sa binduiesc una din sursele de date generate de &lt;STRONG&gt;MSLinqToSQLGenerator&lt;/STRONG&gt; de un listbox este vorba de CUstomers din NorthWInd dar nu afiseaza nimic in listbox&lt;/P&gt;
&lt;P&gt;Intrebarea mea e cum pot face acest lucru si cum pot lega(bindui) o orice intergoare linq de un dateecontrol?&lt;/P&gt;
&lt;P&gt;Multumesc&lt;/P&gt;</description></item></channel></rss>