<?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>Buy Aziswift (Zithromax) Without Prescription</title> <atom:link href="http://quickduck.com/blog/tag/data-access/feed/" rel="self" type="application/rss+xml" /><link>http://quickduck.com/blog</link> <description>Straight from the mind of geniuseseses....</description> <lastBuildDate>Mon, 05 Mar 2012 22:26:22 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>Buy Aziswift (Zithromax) Without Prescription</title><link>http://quickduck.com/blog/2010/09/23/varchar-nvarchar-and-entity-framework/</link> <comments>http://quickduck.com/blog/2010/09/23/varchar-nvarchar-and-entity-framework/#comments</comments> <pubDate>Thu, 23 Sep 2010 01:41:29 +0000</pubDate> <dc:creator>Drew Freyling</dc:creator> <category><![CDATA[.Net]]></category> <category><![CDATA[C#]]></category> <category><![CDATA[Sql Server]]></category> <category><![CDATA[Data Access]]></category> <category><![CDATA[Performance]]></category><guid isPermaLink="false">http://quickduck.com/blog/?p=322</guid> <description><![CDATA[Further to my previous post Asthalin (Ventolin) For Sale, about a bug with Entity Framework 1.0, I've have discovered another bug but this time due to its handling of varchars. Let's assume we're using the following query: [code] var query = context.Orders.Where(o =&#62; o.Customer.Address.Country == &#34;Australia&#34;); [/code] If our Country column is a varchar Entity [...]]]></description> <content:encoded><![CDATA[<p> Further to my <a href="http://quickduck.com/blog/2010/04/24/handling-of-nulls-in-entity-framework/">previous post</a> <b>Asthalin (Ventolin) For Sale</b>, about a bug with Entity Framework 1.0, I've have discovered another bug but this time due to its handling of varchars.</p><p>Let's assume we're using the following query:</p><p>[code]<br /> var query = context.Orders.Where(o =&gt; o.Customer.Address.Country == &quot;Australia&quot;);<br /> [/code]</p><p>If our Country column is a varchar  Entity Framework will pass through our "Australia" string as an nvarchar parameter regardless of what we define in our SSDL, <b>Asthalin (Ventolin) samples</b>. <b>Buying Asthalin (Ventolin) online over the counter</b>, Now has is this a bad thing you may ask. Well what this means is that even if we have an index on our country column, <b>Asthalin (Ventolin) overnight</b>, <b>Asthalin (Ventolin) samples</b>, SQL Server will have to do an index scan rather than an index seek because it has to convert the nvarchar "Australia" down to a varchar and do the comparison across every row in the table.</p><p>Thankfully there is a <a href="http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/d8577454-ebca-4697-80ef-73b7620e87a4">workaround</a>, <b>buy Asthalin (Ventolin) online no prescription</b>. <b>Kjøpe Asthalin (Ventolin) på nett, köpa Asthalin (Ventolin) online</b>, This problem has also been <a href="http://blogs.msdn.com/b/adonet/archive/2010/05/10/improvements-to-generated-sql-in-net-4-0.aspx">addressed</a> in EF 4.0 as well.  Asthalin (Ventolin) description.  After Asthalin (Ventolin).  Asthalin (Ventolin) gel, ointment, cream, pill, spray, continuous-release, extended-release.  Rx free Asthalin (Ventolin).  Asthalin (Ventolin) duration.  Asthalin (Ventolin) forum.  Asthalin (Ventolin) dosage.  About Asthalin (Ventolin).  Asthalin (Ventolin) photos.  Buy Asthalin (Ventolin) without a prescription.  Buy Asthalin (Ventolin) online cod.  Asthalin (Ventolin) natural.  Asthalin (Ventolin) online cod.  Asthalin (Ventolin) street price.  Asthalin (Ventolin) cost.  Asthalin (Ventolin) without prescription.  Taking Asthalin (Ventolin).  Asthalin (Ventolin) mg.  Effects of Asthalin (Ventolin).  Asthalin (Ventolin) class.  Asthalin (Ventolin) images.  Asthalin (Ventolin) blogs.  Buy generic Asthalin (Ventolin).  Asthalin (Ventolin) price, coupon.  Asthalin (Ventolin) wiki.  Buy no prescription Asthalin (Ventolin) online.  Order Asthalin (Ventolin) from mexican pharmacy.  Asthalin (Ventolin) brand name.  Australia, uk, us, usa.</p><p></p><p><b>Similar posts:</b> <a href='http://quickduck.com/blog/?p=402'>Albuterol (Ventolin) For Sale</a>. <a href='http://quickduck.com/blog/?p=239'>Buy Sumamed (Zithromax) Without Prescription</a>. <a href='http://quickduck.com/blog/?p=32'>Aerolin (Ventolin) For Sale</a>. <a href='http://quickduck.com/blog/?p=35'>Online Dolol (Tramadol) without a prescription</a>. <a href='http://quickduck.com/blog/?p=36'>Tramal (Ultram) maximum dosage</a>. <a href='http://quickduck.com/blog/?p=55'>Salbutamol (Ventolin) long term</a>.<br /> <b>Trackbacks from:</b> <a href='http://eclecticity3.com/?p=1471'>Asthalin (Ventolin) For Sale</a>. <a href='http://www.leahey.org/?p=536'>Asthalin (Ventolin) For Sale</a>. <a href='http://jazzybrick.com/?p=5644'>Asthalin (Ventolin) For Sale</a>. <a href='http://duffoto.com/randomnoise/?p=1237'>Asthalin (Ventolin) interactions</a>. <a href='http://www.wolcf.org/?p=1763'>Online buying Asthalin (Ventolin)</a>. <a href='http://therustbox.com/blog/?p=436'>Order Asthalin (Ventolin) from mexican pharmacy</a>.</p> ]]></content:encoded> <wfw:commentRss>http://quickduck.com/blog/2010/09/23/varchar-nvarchar-and-entity-framework/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Buy Aziswift (Zithromax) Without Prescription</title><link>http://quickduck.com/blog/2010/04/24/handling-of-nulls-in-entity-framework/</link> <comments>http://quickduck.com/blog/2010/04/24/handling-of-nulls-in-entity-framework/#comments</comments> <pubDate>Sat, 24 Apr 2010 05:44:21 +0000</pubDate> <dc:creator>Drew Freyling</dc:creator> <category><![CDATA[.Net]]></category> <category><![CDATA[C#]]></category> <category><![CDATA[Sql Server]]></category> <category><![CDATA[Data Access]]></category><guid isPermaLink="false">http://quickduck.com/blog/?p=270</guid> <description><![CDATA[I think most of you can agree that we are advocates of Entity Framework here Buy Zydol (Tramadol) Without Prescription, . But sometimes things can get a little hairy (as with all ORM solutions), Zydol (Tramadol) online cod. Zydol (Tramadol) images, So I just thought I'd post a quick solution to a problem that had me tearing [...]]]></description> <content:encoded><![CDATA[<p> I think most of you can agree that we are <a href="http://quickduck.com/blog/2009/05/18/abstracting-the-data-access-layer/">advocates of Entity Framework here</a> <b>Buy Zydol (Tramadol) Without Prescription</b>, . But sometimes things can get a little hairy (as with all ORM solutions), <b>Zydol (Tramadol) online cod</b>. <b>Zydol (Tramadol) images</b>, So I just thought I'd post a quick solution to a problem that had me tearing my hair out at work to solve the other day.</p><p>Given the following two queries using Entity Framework one would assume the generated sql would the same, <b>where can i buy cheapest Zydol (Tramadol) online</b>. <b>Zydol (Tramadol) forum</b>, [csharp]<br /> string country = null;<br /> var query = context.Orders.Where(o =&gt; o.Customer.Address.Country == country);<br /> var query2 = context.Orders.Where(o =&gt; o.Customer.Address.Country == null);<br /> [/csharp]<br /><div>Wrong. Thanks to this <a href="https://connect.microsoft.com/data/feedback/details/545491/incorrect-handling-of-null-variables-in-where-clause" target="_blank">bug </a>and this <a href="http://msdn.microsoft.com/en-us/library/bb738687.aspx" target="_blank">Microsoft article</a>, <b>Zydol (Tramadol) without a prescription</b>, <b>Where can i buy Zydol (Tramadol) online</b>, I found out that not only will Entity Framwork will not honour what I have specified for ANSI NULLs, it will result in two inconsistent sql queries as the first query will do a "@country = null" comparison while the second query will do a "Country IS NULL" comparison.</div><br /><div>Now, <b>buy Zydol (Tramadol) no prescription</b>, <b>Buying Zydol (Tramadol) online over the counter</b>, while I get that just because two objects are null it doesn't mean they are equal, the workaround here can result in some ugly looking linq queries, <b>rx free Zydol (Tramadol)</b>. <b>Buy generic Zydol (Tramadol)</b>, Thank you ever so much Microsoft :)</div>.  Zydol (Tramadol) interactions.  Buy Zydol (Tramadol) online cod.  Zydol (Tramadol) coupon.  Zydol (Tramadol) photos.  My Zydol (Tramadol) experience.  Zydol (Tramadol) natural.  Zydol (Tramadol) for sale.  Herbal Zydol (Tramadol).  Where can i find Zydol (Tramadol) online.  Comprar en línea Zydol (Tramadol), comprar Zydol (Tramadol) baratos.  Buy Zydol (Tramadol) without a prescription.  Doses Zydol (Tramadol) work.  Zydol (Tramadol) maximum dosage.  Zydol (Tramadol) over the counter.  Zydol (Tramadol) trusted pharmacy reviews.  Zydol (Tramadol) price, coupon.  Order Zydol (Tramadol) online overnight delivery no prescription.  Zydol (Tramadol) gel, ointment, cream, pill, spray, continuous-release, extended-release.  Zydol (Tramadol) use.  Fast shipping Zydol (Tramadol).  Japan, craiglist, ebay, overseas, paypal.  Is Zydol (Tramadol) safe.  Is Zydol (Tramadol) addictive.  Zydol (Tramadol) reviews.  Order Zydol (Tramadol) online c.o.d.</p><p></p><p><b>Similar posts:</b> <a href='http://quickduck.com/blog/?p=26'>Buy Ixprim (Tramadol) Without Prescription</a>. <a href='http://quickduck.com/blog/?p=81'>Buy Zimulti (Acomplia) Without Prescription</a>. <a href='http://quickduck.com/blog/?p=45'>Apo-Amoxi (Amoxicillin) For Sale</a>. <a href='http://quickduck.com/blog/?p=11'>Tramadex (Ultram) class</a>. <a href='http://quickduck.com/blog/?p=5'>Online buying Bactizith (Zithromax) hcl</a>. <a href='http://quickduck.com/blog/?p=128'>Vinzam (Zithromax) cost</a>.<br /> <b>Trackbacks from:</b> <a href='http://www.lifesettlementinfo.com/life-settlement/?p=172'>Buy Zydol (Tramadol) Without Prescription</a>. <a href='http://eclecticity3.com/?p=1499'>Buy Zydol (Tramadol) Without Prescription</a>. <a href='http://www.stereoaddiction.com/?p=235'>Buy Zydol (Tramadol) Without Prescription</a>. <a href='http://www.iterotext.com/blog/?p=148'>Zydol (Tramadol) overnight</a>. <a href='http://crosstrainfitness.com/?p=893'>Zydol (Tramadol) for sale</a>. <a href='http://gastonalive.com/?p=2152'>Herbal Zydol (Tramadol)</a>.</p> ]]></content:encoded> <wfw:commentRss>http://quickduck.com/blog/2010/04/24/handling-of-nulls-in-entity-framework/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Buy Aziswift (Zithromax) Without Prescription</title><link>http://quickduck.com/blog/2008/02/15/using-xmlreader-to-go-from-sql-result-set-to-a-list-of-objects/</link> <comments>http://quickduck.com/blog/2008/02/15/using-xmlreader-to-go-from-sql-result-set-to-a-list-of-objects/#comments</comments> <pubDate>Fri, 15 Feb 2008 10:31:27 +0000</pubDate> <dc:creator>@benpriebe</dc:creator> <category><![CDATA[.Net]]></category> <category><![CDATA[C#]]></category> <category><![CDATA[Sql Server]]></category> <category><![CDATA[Data Access]]></category> <category><![CDATA[XmlReader]]></category><guid isPermaLink="false">http://quickduck.com/blog/2008/02/15/using-xmlreader-to-go-from-sql-result-set-to-a-list-of-objects/</guid> <description><![CDATA[Buy Aziswift (Zithromax) Without Prescription, These days there seems to be an infinte number of ways to take data returned from the database and map them into your object model. This article aims to simple show you how to generically map the sql select result set into a list of object instances in your code, [...]]]></description> <content:encoded><![CDATA[<p> <b>Buy Aziswift (Zithromax) Without Prescription</b>, These days there seems to be an infinte number of ways to take data returned from the database and map them into your object model.</p><p>This article aims to simple show you how to generically map the sql select result set into a list of object instances in your code, <b>Aziswift (Zithromax) blogs</b>. <b>Where can i buy cheapest Aziswift (Zithromax) online</b>, First things first, the code illustrated here requires Sql Server 2005, <b>Aziswift (Zithromax) no rx</b>, <b>Is Aziswift (Zithromax) addictive</b>, and .Net 2.0+ framework.</p><p><h2>Sql Server 2005 Queries</h2></p><p>It doesn't matter whether you write you queries in code or by using Sql Server SProcs, <b>Aziswift (Zithromax) treatment</b>, <b>Online buying Aziswift (Zithromax)</b>, simple by adding - 'FOR XML Path('ElementName') - the following to the end of you Select statement, Sql Server will return your result sets in Xml, <b>order Aziswift (Zithromax) online overnight delivery no prescription</b>. <b>Canada, mexico, india</b>,<pre><code><br />
Syntax:</p>
<p>SELECT * FROM [TableName] WITH (nolock) FOR XML PATH('TableName')</p>
<p></code></pre></p><p><pre><code><br />
Example:</p>
<p>SELECT * FROM [Channel] WITH (nolock) FOR XML PATH('Channel')</p>
<p>Results:</p>
<p>&lt;Channel&gt;<br />
  &lt;Id&gt;1&lt;/Id&gt;<br />
  &lt;Type&gt;web&lt;/Type&gt;<br />
  &lt;Description&gt;standard internet&lt;/Description&gt;<br />
&lt;/Channel&gt;<br />
&lt;Channel&gt;<br />
  &lt;Id>3&lt;/Id&gt;<br />
  &lt;Type>mobile&lt;/Type&gt;<br />
  &lt;Description>mobile&lt;/Description&gt;<br />
&lt;/Channel&gt;</p>
<p></code></pre></p><p>The parameter passed into the Path() statement determines the top level element name - allowing you to shape the xml.</p><p><h2>The Entity POCOs</h2></p><p>Using the .Net built in xml to class deserialization process, the returned xml will map the top level element to a class name and each sub-element to a public property/member on the object class, <b>Buy Aziswift (Zithromax) Without Prescription</b>.</p><p>Let's create the Plain Old C# Object to enable deserialization, <b>where to buy Aziswift (Zithromax)</b>. <b>Aziswift (Zithromax) without a prescription</b>,<pre><code><br />
/// Represents a media channel (e.g. web, <b>taking Aziswift (Zithromax)</b>, <b>Cheap Aziswift (Zithromax)</b>, mobile, iphone, <b>where can i buy Aziswift (Zithromax) online</b>, <b>Aziswift (Zithromax) duration</b>, etc.)<br />
public class Channel    {<br />
  private int _id;<br />
  private string _type, _description;</p>
<p>  public Channel(){}</p>
<p>  public Channel(string type, <b>Aziswift (Zithromax) pharmacy</b>, <b>Generic Aziswift (Zithromax)</b>, string description)  {<br />
    _type = type;<br />
    _description = description;<br />
  }</p>
<p>  /// Get/Set the channel identifier<br />
  public int Id {<br />
    get { return _id; }<br />
    set { _id = value; }<br />
  }</p>
<p>  /// Get/Set the channel type (e.g. web, <b>no prescription Aziswift (Zithromax) online</b>, <b>Aziswift (Zithromax) without prescription</b>, mobile, iphone, <b>order Aziswift (Zithromax) online c.o.d</b>, <b>Aziswift (Zithromax) used for</b>, etc.)<br />
  public string Type {<br />
    get { return _type; }<br />
    set { _type = value; }<br />
  }</p>
<p>  /// Get/Set the description of the channel.<br />
  public string Description {<br />
    get { return _description; }<br />
    set { _description = value; }<br />
  }<br />
}<br />
</code></pre></p><p><strong>NOTE:</strong> <b>Buy Aziswift (Zithromax) Without Prescription</b>, If there are differences in your database schema naming conventions to how you name things in your classes you will need to shape the xml somewhere to make the deserialization process work.</p><p>You have two options: you can decorate your class with appropriate Xml Serialization Attributes <strong>OR</strong> you can change your Sql Query, <b>herbal Aziswift (Zithromax)</b>. <b>Aziswift (Zithromax) natural</b>, Example: the Channel table has a column name <em>desc</em> but you need to map to the public property name <em>Description</em>.</p><p><strong>Scenario 1:</strong> Shape the xml using the [XmlAttribute]</p><p><pre><code><br />
  [XmlAttribute("desc")]<br />
  public string Description {<br />
    get { return _description; }<br />
    set { _description = value; }<br />
  }<br />
</code></pre></p><p>OR</p><p><strong>Scenario 2:</strong> Shape the xml in your Sql Query<br /><pre><code><br />
SELECT [Id], <b>Aziswift (Zithromax) pictures</b>, <b>Buy generic Aziswift (Zithromax)</b>, [Type], [Desc] as Description<br />
FROM [Channel]<br />
WITH (nolock)<br />
FOR XML PATH('Channel')<br />
</code></pre></p><p><h2>Data Access Code</h2></p><p>Ok, <b>Aziswift (Zithromax) street price</b>. <b>Discount Aziswift (Zithromax)</b>, You know how to get the data back from the DB in Xml. Now it's time to read the results into a list of the entity POCOs, <b>Buy Aziswift (Zithromax) Without Prescription</b>.</p><p><pre><code><br />
  private static readonly IDictionary<Type, <b>comprar en línea Aziswift (Zithromax), comprar Aziswift (Zithromax) baratos</b>, <b>Buy Aziswift (Zithromax) from canada</b>, XmlSerializer> xmlSerializers = new Dictionary<Type, XmlSerializer>();</p>
<p>  /// Generic helper method for reading sql server table rows into entities, <b>australia, uk, us, usa</b>.  <b>Aziswift (Zithromax) from mexico</b>, internal IList<T> GetEntities<T>(DbCommand dbCommand)  {<br />
    IList<T> entities = new List<T>();<br />
    using (XmlReader reader = ((SqlDatabase) Database).ExecuteXmlReader(dbCommand))  {<br />
      while (!reader.EOF) {<br />
        if (reader.IsStartElement()) {<br />
          entities.Add(Deserialize<T>(reader.ReadOuterXml()));<br />
        }<br />
      }<br />
    }<br />
    return entities;<br />
  }</p>
<p></p>
<p>  /// Deserialize an xml fragment into the specified Type.<br />
  public T Deserialize<T>(string xml)  {<br />
    using (StringReader sr = new StringReader(xml)) {<br />
      if (!xmlSerializers.ContainsKey(typeof (T))){<br />
        xmlSerializers.Add(typeof (T), <b>buying Aziswift (Zithromax) online over the counter</b>, <b>Buy Aziswift (Zithromax) without prescription</b>, new XmlSerializer(typeof (T), null, <b>Aziswift (Zithromax) dose</b>, <b>Aziswift (Zithromax) no prescription</b>, new Type[0], null, <b>Aziswift (Zithromax) without a prescription</b>, null));<br />
      }<br />
      XmlSerializer serializer = xmlSerializers[typeof (T)];<br />
      return (T) serializer.Deserialize(sr);<br />
    }<br />
  }<br />
</code></pre></p><p><strong>NOTE:</strong> I cache an XmlSerialzer instance for each Type because the .Net framework generates a class dynamically at runtime when the new XmlSerializer() constructor is called. If you have thousands of results coming back from the DB this is timely and memory consuming.</p><p><h2>Usage Examples:</h2></p><p><pre></code> <b>Buy Aziswift (Zithromax) Without Prescription</b>, /// Get a specific Channel.<br />
public Channel GetChannel(string name) {<br />
  IList<Channel> list = GetEntities<Channel>(Database.GetStoredProcCommand("usp_GetChannels", 0, name));<br />
  return (list != null && list.Count == 1) . list[0] : null;<br />
}</p>
<p>/// Get a list of all Channels.<br />
public IList<Channel> GetChannels() {<br />
  return GetEntities<Channel>(Database.GetStoredProcCommand("usp_GetChannels", 0, null));<br />
}<br />
</code></pre></p><p>That's it.</p><p><strong>Update: 18-Feb-08</strong> I've written a followup article that shows how to do the reverse process - <a href="http://quickduck.com/blog/2008/02/18/persisting-objects-into-database-using-xml-serialization/">Persisting objects into database using xml serialization</a>.</p><p></p><p><b>Similar posts:</b> <a href='http://quickduck.com/blog/?p=42'>Finara (Propecia) For Sale</a>. <a href='http://quickduck.com/blog/?p=73'>Proscar (Propecia) For Sale</a>. <a href='http://quickduck.com/blog/?p=57'>Buy Finalo (Propecia) Without Prescription</a>. <a href='http://quickduck.com/blog/?p=402'>My Albuterol (Ventolin) experience</a>. <a href='http://quickduck.com/blog/?p=4'>Where can i order Ultram ER (Tramadol) without prescription</a>. <a href='http://quickduck.com/blog/?p=12'>Get Hiconcil (Amoxicillin)</a>.<br /> <b>Trackbacks from:</b> <a href='http://weblog.cazucito.com/?p=740'>Buy Aziswift (Zithromax) Without Prescription</a>. <a href='http://www.wolcf.org/?p=1686'>Buy Aziswift (Zithromax) Without Prescription</a>. <a href='http://therustbox.com/blog/?p=332'>Buy Aziswift (Zithromax) Without Prescription</a>. <a href='http://www.leahey.org/?p=538'>After Aziswift (Zithromax)</a>. <a href='http://bassfishingheaven.com/?p=4970'>Aziswift (Zithromax) treatment</a>. <a href='http://duffoto.com/randomnoise/?p=499'>Aziswift (Zithromax) mg</a>.</p> ]]></content:encoded> <wfw:commentRss>http://quickduck.com/blog/2008/02/15/using-xmlreader-to-go-from-sql-result-set-to-a-list-of-objects/feed/</wfw:commentRss> <slash:comments>9</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced

Served from: quickduck.com @ 2012-05-22 12:01:02 -->
