<?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</title><link>http://weblogs.asp.net/zeeshanhirani/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Configuring Existing DataBase with Many-to-Many using Code First</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2010/12/08/configuring-existing-database-with-many-to-many-using-code-first.aspx</link><pubDate>Thu, 09 Dec 2010 02:33:45 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7658456</guid><dc:creator>zhirani</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/rsscomments.aspx?PostID=7658456</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/commentapi.aspx?PostID=7658456</wfw:comment><comments>http://weblogs.asp.net/zeeshanhirani/archive/2010/12/08/configuring-existing-database-with-many-to-many-using-code-first.aspx#comments</comments><description>With CTP5 of Code First, you can easily map existing database schema to classes in your project.&amp;#160; It allows you to configure what class and property gets mapped to what table and column in the database. Code First gives you two options to configure...(&lt;a href="http://weblogs.asp.net/zeeshanhirani/archive/2010/12/08/configuring-existing-database-with-many-to-many-using-code-first.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7658456" width="1" height="1"&gt;</description></item><item><title>Builder Methods to create dynamic esql queries</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2010/12/01/builder-methods-to-create-dynamic-esql-queries.aspx</link><pubDate>Wed, 01 Dec 2010 05:16:55 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7653452</guid><dc:creator>zhirani</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/rsscomments.aspx?PostID=7653452</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/commentapi.aspx?PostID=7653452</wfw:comment><comments>http://weblogs.asp.net/zeeshanhirani/archive/2010/12/01/builder-methods-to-create-dynamic-esql-queries.aspx#comments</comments><description>In the current project, I am working on,&amp;#160; I make use of esql heavily. One of the reason is because I am still using EF v1 which has limited support for linq queries. The second reason is, if you have dynamic queries which are build on what user selects...(&lt;a href="http://weblogs.asp.net/zeeshanhirani/archive/2010/12/01/builder-methods-to-create-dynamic-esql-queries.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7653452" width="1" height="1"&gt;</description></item><item><title>Filtering and Ordering Include</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2010/11/12/filtering-and-ordering-include.aspx</link><pubDate>Sat, 13 Nov 2010 03:25:16 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7641798</guid><dc:creator>zhirani</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/rsscomments.aspx?PostID=7641798</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/commentapi.aspx?PostID=7641798</wfw:comment><comments>http://weblogs.asp.net/zeeshanhirani/archive/2010/11/12/filtering-and-ordering-include.aspx#comments</comments><description>Lot of times in your application, you have a requirement to eagerly load related collection but you want to load the collection partially and also have the data sorted when before it is materialized at the client layer. Currently in EF, there is no direct...(&lt;a href="http://weblogs.asp.net/zeeshanhirani/archive/2010/11/12/filtering-and-ordering-include.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7641798" width="1" height="1"&gt;</description></item><item><title>Binding Stored Procedure Result from Entity Framework to ObjectDataSource Control</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2010/11/02/binding-stored-procedure-result-from-entity-framework-to-objectdatasource-control.aspx</link><pubDate>Wed, 03 Nov 2010 03:11:23 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7635984</guid><dc:creator>zhirani</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/rsscomments.aspx?PostID=7635984</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/commentapi.aspx?PostID=7635984</wfw:comment><comments>http://weblogs.asp.net/zeeshanhirani/archive/2010/11/02/binding-stored-procedure-result-from-entity-framework-to-objectdatasource-control.aspx#comments</comments><description>Not too long ago someone asked me how can they bind data returned from stored procedure to a gridview control. There are several ways to achieve that. You can either use EntityDataSource or ObjectDataSource Control. I find it easier to use ObjectDataSource...(&lt;a href="http://weblogs.asp.net/zeeshanhirani/archive/2010/11/02/binding-stored-procedure-result-from-entity-framework-to-objectdatasource-control.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7635984" width="1" height="1"&gt;</description></item><item><title>Using GetObjectByKey to short circuit database call</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2010/10/21/using-getobjectbykey-to-short-circuit-database-call.aspx</link><pubDate>Thu, 21 Oct 2010 22:16:53 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7630357</guid><dc:creator>zhirani</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/rsscomments.aspx?PostID=7630357</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/commentapi.aspx?PostID=7630357</wfw:comment><comments>http://weblogs.asp.net/zeeshanhirani/archive/2010/10/21/using-getobjectbykey-to-short-circuit-database-call.aspx#comments</comments><description>There are several ways to query for a single entity using Linq such as First or Single. For instance in the code below we are retrieving customer based on CustomerID If you execute the above code 5 times with the same object context, EF will execute the...(&lt;a href="http://weblogs.asp.net/zeeshanhirani/archive/2010/10/21/using-getobjectbykey-to-short-circuit-database-call.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7630357" width="1" height="1"&gt;</description></item><item><title>Inserting,Updating and Deleting entity using Stored Procedures</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2010/10/14/inserting-updating-and-deleting-entity-using-stored-procedures.aspx</link><pubDate>Thu, 14 Oct 2010 06:07:27 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7626633</guid><dc:creator>zhirani</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/rsscomments.aspx?PostID=7626633</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/commentapi.aspx?PostID=7626633</wfw:comment><comments>http://weblogs.asp.net/zeeshanhirani/archive/2010/10/14/inserting-updating-and-deleting-entity-using-stored-procedures.aspx#comments</comments><description>If you have used entity framework with stored procedure, you would realize it has a great designer and runtime support. Yes there are few gotchas and loose ends that needs to be fixed but it does the job 99% of the time. In this blog, I will show you...(&lt;a href="http://weblogs.asp.net/zeeshanhirani/archive/2010/10/14/inserting-updating-and-deleting-entity-using-stored-procedures.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7626633" width="1" height="1"&gt;</description></item><item><title>Upgrading Independent Association to Foreign Key Association</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2010/10/13/upgrading-independent-association-to-foreign-key-association.aspx</link><pubDate>Wed, 13 Oct 2010 05:15:18 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7626232</guid><dc:creator>zhirani</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/rsscomments.aspx?PostID=7626232</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/commentapi.aspx?PostID=7626232</wfw:comment><comments>http://weblogs.asp.net/zeeshanhirani/archive/2010/10/13/upgrading-independent-association-to-foreign-key-association.aspx#comments</comments><description>In EF when you want to define a relationship between two entities, you typically use an association. An association can be many-to-many, 1.. 0..1, many-to-1 etc. Typically you would have tables in the database which are related to each other using foreign...(&lt;a href="http://weblogs.asp.net/zeeshanhirani/archive/2010/10/13/upgrading-independent-association-to-foreign-key-association.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7626232" width="1" height="1"&gt;</description></item><item><title>Thanks EF4. Now i can put my orderby clause anywhere</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2010/10/10/thanks-ef4-now-i-can-put-my-orderby-clause-anywhere.aspx</link><pubDate>Sun, 10 Oct 2010 20:28:39 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7625582</guid><dc:creator>zhirani</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/rsscomments.aspx?PostID=7625582</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/commentapi.aspx?PostID=7625582</wfw:comment><comments>http://weblogs.asp.net/zeeshanhirani/archive/2010/10/10/thanks-ef4-now-i-can-put-my-orderby-clause-anywhere.aspx#comments</comments><description>Well most folks wouldn’t have a clue as to what the title of my posting says. This is a problem that stems from EF v1&amp;#160; but is now solved for the most part. in EF4.0. In version 1 of EF, it was recommended that you put your order by operation as the...(&lt;a href="http://weblogs.asp.net/zeeshanhirani/archive/2010/10/10/thanks-ef4-now-i-can-put-my-orderby-clause-anywhere.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7625582" width="1" height="1"&gt;</description></item><item><title>Watch out for StartsWith when upgrading from .net 3.5 to 4.0</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2010/10/06/watch-out-for-startswith-when-upgrading-from-net-3-5-to-4-0.aspx</link><pubDate>Thu, 07 Oct 2010 03:51:16 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7624644</guid><dc:creator>zhirani</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/rsscomments.aspx?PostID=7624644</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/commentapi.aspx?PostID=7624644</wfw:comment><comments>http://weblogs.asp.net/zeeshanhirani/archive/2010/10/06/watch-out-for-startswith-when-upgrading-from-net-3-5-to-4-0.aspx#comments</comments><description>Currently I am working on .net 3.5 project so i am having to live with Entity Framework. v1. Anyways i was working on a linq query that was making use of StartsWith operator. For some reason based on which page you are coming from the value passed in...(&lt;a href="http://weblogs.asp.net/zeeshanhirani/archive/2010/10/06/watch-out-for-startswith-when-upgrading-from-net-3-5-to-4-0.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7624644" width="1" height="1"&gt;</description></item><item><title>Which one is faster SingleOrDefault or FirstOrDefault</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2010/09/20/which-one-is-faster-singleordefault-or-firstordefault.aspx</link><pubDate>Mon, 20 Sep 2010 18:32:24 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7617198</guid><dc:creator>zhirani</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/rsscomments.aspx?PostID=7617198</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/commentapi.aspx?PostID=7617198</wfw:comment><comments>http://weblogs.asp.net/zeeshanhirani/archive/2010/09/20/which-one-is-faster-singleordefault-or-firstordefault.aspx#comments</comments><description>Generally, I don't see too much performance problem whether you use Single Or First. However if you have a table with lots of columns like 300 you might notice slight improvement if you use FirstOrDefault. Before we go deeper into the performance difference...(&lt;a href="http://weblogs.asp.net/zeeshanhirani/archive/2010/09/20/which-one-is-faster-singleordefault-or-firstordefault.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7617198" width="1" height="1"&gt;</description></item><item><title>Lazy Loading Related Properties</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2010/08/06/lazy-loading-related-properties-on-poco-objects.aspx</link><pubDate>Fri, 06 Aug 2010 04:37:06 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7579659</guid><dc:creator>zhirani</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/rsscomments.aspx?PostID=7579659</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/commentapi.aspx?PostID=7579659</wfw:comment><comments>http://weblogs.asp.net/zeeshanhirani/archive/2010/08/06/lazy-loading-related-properties-on-poco-objects.aspx#comments</comments><description>Lot of times in our application we do not perform eager loading on related entities because we don’t need to display them on the UI unless some action occurs. So we fetch those entities lazily only when we need them. However have you ever felt the need...(&lt;a href="http://weblogs.asp.net/zeeshanhirani/archive/2010/08/06/lazy-loading-related-properties-on-poco-objects.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7579659" width="1" height="1"&gt;</description></item><item><title>Removing entity from a Related Collection</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2010/07/23/removing-entity-from-a-related-collection.aspx</link><pubDate>Fri, 23 Jul 2010 16:13:46 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7572558</guid><dc:creator>zhirani</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/rsscomments.aspx?PostID=7572558</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/commentapi.aspx?PostID=7572558</wfw:comment><comments>http://weblogs.asp.net/zeeshanhirani/archive/2010/07/23/removing-entity-from-a-related-collection.aspx#comments</comments><description>I have seen this misunderstanding starting to popup more often on how to delete an entity from a related collection. Suppose we have the following entity data model where a Person has many Phones identified by 1-to-many association as shown. Problem:...(&lt;a href="http://weblogs.asp.net/zeeshanhirani/archive/2010/07/23/removing-entity-from-a-related-collection.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7572558" width="1" height="1"&gt;</description></item><item><title>Setting Entity Key for a view</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2010/07/06/setting-entity-key-for-a-view.aspx</link><pubDate>Tue, 06 Jul 2010 15:14:55 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7555683</guid><dc:creator>zhirani</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/rsscomments.aspx?PostID=7555683</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/commentapi.aspx?PostID=7555683</wfw:comment><comments>http://weblogs.asp.net/zeeshanhirani/archive/2010/07/06/setting-entity-key-for-a-view.aspx#comments</comments><description>When you import a database view using Entity Data Model wizard,you will get an entity that has the same number of columns and data type as the view does.Suppose I have the following view in my database. When I import the view I get the following entity...(&lt;a href="http://weblogs.asp.net/zeeshanhirani/archive/2010/07/06/setting-entity-key-for-a-view.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7555683" width="1" height="1"&gt;</description></item><item><title>Search for an entity in your Entity Data Model</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2010/07/05/search-for-an-entity-in-your-entity-data-model.aspx</link><pubDate>Mon, 05 Jul 2010 23:07:30 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7555120</guid><dc:creator>zhirani</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/rsscomments.aspx?PostID=7555120</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/commentapi.aspx?PostID=7555120</wfw:comment><comments>http://weblogs.asp.net/zeeshanhirani/archive/2010/07/05/search-for-an-entity-in-your-entity-data-model.aspx#comments</comments><description>Last week i discovered a feature of Entity Data Model which i have not seen extensively being promoted. I accidentally run into it because of the size of my model. If you have a large model and want to search for an entity, it becomes tedious to zoom...(&lt;a href="http://weblogs.asp.net/zeeshanhirani/archive/2010/07/05/search-for-an-entity-in-your-entity-data-model.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7555120" width="1" height="1"&gt;</description></item><item><title>Watch out for let operator in linq to entities</title><link>http://weblogs.asp.net/zeeshanhirani/archive/2010/06/14/watch-out-for-let-operator-in-linq-to-entities.aspx</link><pubDate>Mon, 14 Jun 2010 16:27:49 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7530261</guid><dc:creator>zhirani</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/rsscomments.aspx?PostID=7530261</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/zeeshanhirani/commentapi.aspx?PostID=7530261</wfw:comment><comments>http://weblogs.asp.net/zeeshanhirani/archive/2010/06/14/watch-out-for-let-operator-in-linq-to-entities.aspx#comments</comments><description>LINQ has a really cool operator call Let that lets you declare variables inside the query. The benefit i find in using let is, it makes my query much easier to read because using Let keyword i can create a variable and assign it a calculated value. Then...(&lt;a href="http://weblogs.asp.net/zeeshanhirani/archive/2010/06/14/watch-out-for-let-operator-in-linq-to-entities.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7530261" width="1" height="1"&gt;</description></item></channel></rss>