<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/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>Zeeshan Hirani - All Comments</title><link>http://weblogs.asp.net/zeeshanhirani/default.aspx</link><description>Senior .net Developer&lt;br /&gt;
CheaperThanDirt.com


</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Debug Build: 20510.895)</generator><item><title>re: Comparing Anonymous Types</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2008/04/20/comparing-anonymous-types.aspx#6597074</link><pubDate>Thu, 04 Sep 2008 01:24:09 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6597074</guid><dc:creator>Curt</dc:creator><description>&lt;p&gt;Not a bad explanation. &amp;nbsp;Made things clearer to me for sure.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6597074" width="1" height="1"&gt;</description></item><item><title>re: DataContext.GetChangeSet to find what objects have changed</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2008/07/02/datacontext-getchangeset-to-find-what-objects-have-changed.aspx#6577401</link><pubDate>Fri, 29 Aug 2008 22:15:20 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6577401</guid><dc:creator>Steve S</dc:creator><description>&lt;p&gt;Hi z,&lt;/p&gt;
&lt;p&gt;Many thanks for that. &amp;nbsp;It is just what I wanted, except I am working in VB.NET (using VWD Express 2008).&lt;/p&gt;
&lt;p&gt;Could you point me to the correct (VB.NET) syntax for your penultimate line of code?&lt;/p&gt;
&lt;p&gt;changenext = &amp;nbsp;....&lt;/p&gt;
&lt;p&gt;I am not sufficiently familiar with Reflection (yet).&lt;/p&gt;
&lt;p&gt;Also in your code, you have created a new NorthWindDataContext.&lt;/p&gt;
&lt;p&gt;How can I hookup these traces to the datacontext that is being defined and used declaratively (with a formview )in the .aspx markup?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Steve&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6577401" width="1" height="1"&gt;</description></item><item><title>re: Single Table Inheritance in Entity Framework</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2008/08/16/single-table-inheritance-in-entity-framework.aspx#6572534</link><pubDate>Wed, 27 Aug 2008 22:15:55 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6572534</guid><dc:creator>Spencer</dc:creator><description>&lt;p&gt;Very helpful and works great as far as it goes, but when I try to create an association between a descendant and another class, it fails. &amp;nbsp;I have two fields in my table, entity_type and entity_id. &amp;nbsp;The entity_id is a key to the other table. &amp;nbsp;So, extending your example, if there were a class for Office and a class for Cubicle, then an Office has an association to the SalariedEmployee and the Cubicle has an association to the HourlyEmployee. &amp;nbsp;I can't seem to get these to map and am stuck. &amp;nbsp;I get an error about Multiplicity is not valid... &amp;nbsp;It makes sense, since it is not allowing me to map the entity_id field--it keeps mapping the id for each table, which is wrong.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6572534" width="1" height="1"&gt;</description></item><item><title>re: Avoiding Roundtrip with Load in Entity Framework</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2008/08/22/avoiding-roundtrip-with-load-in-entity-framework.aspx#6558864</link><pubDate>Sun, 24 Aug 2008 09:30:57 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6558864</guid><dc:creator>Mike.Borozdin</dc:creator><description>&lt;p&gt;Great as usual!&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6558864" width="1" height="1"&gt;</description></item><item><title>re: Single Table Inheritance in Entity Framework</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2008/08/16/single-table-inheritance-in-entity-framework.aspx#6558842</link><pubDate>Sun, 24 Aug 2008 09:25:10 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6558842</guid><dc:creator>Mike.Borozdin</dc:creator><description>&lt;p&gt;Excellent post! Keep it up!&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6558842" width="1" height="1"&gt;</description></item><item><title>re: Many To Many Mappings in Entity Framework</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2008/08/21/many-to-many-mappings-in-entity-framework.aspx#6555060</link><pubDate>Sat, 23 Aug 2008 06:14:21 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6555060</guid><dc:creator>quachnguyen</dc:creator><description>&lt;p&gt;Thank for you replying.&lt;/p&gt;
&lt;p&gt;But I got run-time error with message&lt;/p&gt;
&lt;p&gt;The data source for GridView with id 'grdView' did not have any properties or attributes from which to generate columns. &amp;nbsp;Ensure that your data source has content.&lt;/p&gt;
&lt;p&gt;I also create column with databound filed. &lt;/p&gt;
&lt;p&gt;Please show me how to fix problem,&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6555060" width="1" height="1"&gt;</description></item><item><title>re: Single Table Inheritance in Entity Framework</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2008/08/16/single-table-inheritance-in-entity-framework.aspx#6553539</link><pubDate>Fri, 22 Aug 2008 22:06:03 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6553539</guid><dc:creator>Dan</dc:creator><description>&lt;p&gt;Best walk-though of this I've seen. &amp;nbsp;I wouldn't have been able to determine that I needed to delete the discriminator column from the base type without this post. &amp;nbsp;Thanks!&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6553539" width="1" height="1"&gt;</description></item><item><title>re: Many To Many Mappings in Entity Framework</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2008/08/21/many-to-many-mappings-in-entity-framework.aspx#6552802</link><pubDate>Fri, 22 Aug 2008 18:15:58 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6552802</guid><dc:creator>zhirani</dc:creator><description>&lt;p&gt;Welcome to the hard facts of entity framework.&lt;/p&gt;
&lt;p&gt;Try this&lt;/p&gt;
&lt;p&gt; NorthwindEntities entity = new NorthwindEntities();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; var product = entity.Products.First(p =&amp;gt; p.ProductID == 1);&lt;/p&gt;
&lt;p&gt; product.Order_Details.Load();//must be done.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; var order = product.Order_Details.Select(o =&amp;gt; o.Orders);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; lblCount.Text = order.Count().ToString();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; grdView.DataSource = order;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; grdView.DataBind();&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6552802" width="1" height="1"&gt;</description></item><item><title>re: Many To Many Mappings in Entity Framework</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2008/08/21/many-to-many-mappings-in-entity-framework.aspx#6551918</link><pubDate>Fri, 22 Aug 2008 14:08:02 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6551918</guid><dc:creator>quachnguyen</dc:creator><description>&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NorthwindEntities entity = new NorthwindEntities();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var product = entity.Products.First(p =&amp;gt; p.ProductID == 1);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var order = product.Order_Details.Select(o =&amp;gt; o.Orders);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lblCount.Text = order.Count().ToString();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;grdView.DataSource = order;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;grdView.DataBind();&lt;/p&gt;
&lt;p&gt;Could you please correct me? It's returned 0 row. But When I execute with management tool, It return 38 records.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;QuachNguyen&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6551918" width="1" height="1"&gt;</description></item><item><title>re: Different Implementation of Cast in Linq To SQL And Entity Framework</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2008/08/18/different-implementation-of-cast-in-linq-to-sql-and-entity-framework.aspx#6549175</link><pubDate>Thu, 21 Aug 2008 22:32:55 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6549175</guid><dc:creator>RichardD</dc:creator><description>&lt;p&gt;The EF implementation seems right to me - it matches the behaviour of the Cast method with Linq to Objects. &lt;/p&gt;
&lt;p&gt;If you only want to return the items which can successfully be cast to a type, use the OfType method instead. Hopefully, the SQL and EF versions should be able to convert that to a database query which only returns the required records.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6549175" width="1" height="1"&gt;</description></item></channel></rss>