{"id":3892,"date":"2014-03-30T06:11:31","date_gmt":"2014-03-30T06:11:31","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/is-this-a-spurious-warning-when-using-linq-to-sql-collection-of-common-programming-errors\/"},"modified":"2014-03-30T06:11:31","modified_gmt":"2014-03-30T06:11:31","slug":"is-this-a-spurious-warning-when-using-linq-to-sql-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/is-this-a-spurious-warning-when-using-linq-to-sql-collection-of-common-programming-errors\/","title":{"rendered":"Is this a spurious warning when using LINQ to SQL?-Collection of common programming errors"},"content":{"rendered":"<p>Per the many examples of LINQ I&#8217;ve seen, I&#8217;m creating my own data context and tables using code similar to the one below:<\/p>\n<pre><code>class MyDatabase : DataContext {\n  public Table Widgets;\n  public Table Cars;\n\n  public MyDatabase (string connection) : base(connection) { } \n}\n<\/code><\/pre>\n<p>But for every table (Widgets, Cars, etc), I get the warning <strong>Field &#8216;TableName&#8217; is never assigned<\/strong>. I can&#8217;t find anyone on Google that also has this problem. I don&#8217;t feel like I&#8217;m doing anything wrong since I&#8217;m just copying the LINQ examples I&#8217;ve seen from different places. So what&#8217;s up with this warning? Is it warning me of a real problem? Or am I missing something?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Per the many examples of LINQ I&#8217;ve seen, I&#8217;m creating my own data context and tables using code similar to the one below: class MyDatabase : DataContext { public Table Widgets; public Table Cars; public MyDatabase (string connection) : base(connection) { } } But for every table (Widgets, Cars, etc), I get the warning Field [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3892","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3892","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3892"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3892\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3892"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3892"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3892"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}