<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/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>EDM and Store functions exposed in LINQ</title><link>http://blogs.msdn.com/efdesign/archive/2008/10/08/edm-and-store-functions-exposed-in-linq.aspx</link><description>In this post Colin Meek and Diego Vega delve into some enhancements we are planning for LINQ to Entities, anyway over to them... Entity Framework v1 customers preferring to write their queries using LINQ often hit a limitation on the range of functions</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Exposing EDM and database server functions to LINQ</title><link>http://blogs.msdn.com/efdesign/archive/2008/10/08/edm-and-store-functions-exposed-in-linq.aspx#8992403</link><pubDate>Thu, 09 Oct 2008 06:36:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8992403</guid><dc:creator>Diego Vega</dc:creator><description>&lt;p&gt;Alex published today a description Colin and I wrote on a new feature the team has been working on for&lt;/p&gt;
</description></item><item><title>re: EDM and Store functions exposed in LINQ</title><link>http://blogs.msdn.com/efdesign/archive/2008/10/08/edm-and-store-functions-exposed-in-linq.aspx#8992510</link><pubDate>Thu, 09 Oct 2008 09:45:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8992510</guid><dc:creator>Zeeshan Hirani</dc:creator><description>&lt;p&gt;In the above examples, I did not see any example of functions returning out paramter and table values functions. In linq to sql I have functions returning a collection of entity which i can join against an existing query. Is that supported?&lt;/p&gt;
&lt;p&gt;Also it would be nice to get support for functions taking table, a new featured in sql server 2008?&lt;/p&gt;
&lt;p&gt;thks&lt;/p&gt;
&lt;p&gt;Zeeshan Hirani&lt;/p&gt;
</description></item><item><title>re: EDM and Store functions exposed in LINQ</title><link>http://blogs.msdn.com/efdesign/archive/2008/10/08/edm-and-store-functions-exposed-in-linq.aspx#8993187</link><pubDate>Thu, 09 Oct 2008 22:24:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8993187</guid><dc:creator>Zeeshan Hirani</dc:creator><description>&lt;p&gt;will the function defined on teh clr be available for use with entit sql as well?&lt;/p&gt;
</description></item><item><title>re: EDM and Store functions exposed in LINQ</title><link>http://blogs.msdn.com/efdesign/archive/2008/10/08/edm-and-store-functions-exposed-in-linq.aspx#8993770</link><pubDate>Fri, 10 Oct 2008 08:53:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8993770</guid><dc:creator>divega</dc:creator><description>&lt;p&gt;Zeeshan,&lt;/p&gt;
&lt;p&gt;Regarding TVFs and TVPs, we do want to support them with this mechanism, but we first need to build the capability in lower layers in the Entity Framework stack. At this point, we are not sure where this is going to land.&lt;/p&gt;
&lt;p&gt;Regarding your question on whether the CLR functions is going to be available from Entity SQL queries: if you are referring to arbitrary CLR functions being available in Entity SQL, the answer is no. That would require of a general mechanism to translate IL code to the query language of the database server. For instance, there is no general way to translate arbitrary IL code into T-SQL. If you are referring to the functions we are exposing to LINQ with this feature, they are already available to Entity SQL queries. &lt;/p&gt;
&lt;p&gt;Perhaps you are interested in having methods that have both a runtime CLR behavior and a corresponding semantics when used in queries. Then the answer is yes, that would be possible with this mechanism.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Diego&lt;/p&gt;
</description></item><item><title>re: EDM and Store functions exposed in LINQ</title><link>http://blogs.msdn.com/efdesign/archive/2008/10/08/edm-and-store-functions-exposed-in-linq.aspx#8993858</link><pubDate>Fri, 10 Oct 2008 10:26:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8993858</guid><dc:creator>Zeeshan Hirani</dc:creator><description>&lt;p&gt;Thanks Diego for the explanation. I was looking for functions exposed to linq be also available for esql which u said it would be.&lt;/p&gt;
&lt;p&gt;Another question. Not sure if this is a right place to ask. Can we expect to retun partially filled entity cuz lot of times we do not need entire entity yet Ef requires a full entity set. Can the restriction be reduced to returning partially filled entity containing only entity key.&lt;/p&gt;
&lt;p&gt;Like in Linq to sql, I can return partially filled entity from stored procedure or dynamic sql as long as the reocrd set contains the column name that matches teh column name defined as the primary key on the entity.&lt;/p&gt;
&lt;p&gt;Also can we get relationship span to work with stored procedure as well?&lt;/p&gt;
</description></item><item><title>re: EDM and Store functions exposed in LINQ</title><link>http://blogs.msdn.com/efdesign/archive/2008/10/08/edm-and-store-functions-exposed-in-linq.aspx#8994005</link><pubDate>Fri, 10 Oct 2008 13:12:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8994005</guid><dc:creator>Stefan Dobrev</dc:creator><description>&lt;p&gt;The support seems promising. &lt;/p&gt;
&lt;p&gt;Here are 2 ideas I have in mind:&lt;/p&gt;
&lt;p&gt;1. For the static functions - can't we just declare them as extern without providing &amp;quot;dummy&amp;quot; implementation that throws exceptions.&lt;/p&gt;
&lt;p&gt;2. It is good to think about some kind of alternative syntax for Expression tree, because currently it seems a little bit ugly. Maybe some kind of expression tree's magic can do the trick: &lt;/p&gt;
&lt;p&gt;public static double? StandardDeviation( this IQueryable&amp;lt;int?&amp;gt; source )&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Expression ex = EntityExpression.Create( source.StandardDeviation() );&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;return source.Provider.Execute&amp;lt;double?&amp;gt;( ex );&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
</description></item><item><title>re: EDM and Store functions exposed in LINQ</title><link>http://blogs.msdn.com/efdesign/archive/2008/10/08/edm-and-store-functions-exposed-in-linq.aspx#8995709</link><pubDate>Sat, 11 Oct 2008 13:40:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8995709</guid><dc:creator>Diego Vega</dc:creator><description>&lt;p&gt;Zeeshan, &lt;/p&gt;
&lt;p&gt;I would like to understand more about the scenarios for &amp;quot;partially filled entities&amp;quot;. I not sure what is exactly possible and in which circumstances this is more useful than a projection. I am aware that we support materializing arbitrary classes and using ExecuteQuery and Translate in LINQ to SQL, and I agree that is a useful feature.&lt;/p&gt;
&lt;p&gt;I will follow up on your other question on query span iwth stored procedures with someone that may know the answer.&lt;/p&gt;
</description></item><item><title>re: EDM and Store functions exposed in LINQ</title><link>http://blogs.msdn.com/efdesign/archive/2008/10/08/edm-and-store-functions-exposed-in-linq.aspx#8995726</link><pubDate>Sat, 11 Oct 2008 13:59:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8995726</guid><dc:creator>efdesign</dc:creator><description>&lt;p&gt;Stefan,&lt;/p&gt;
&lt;p&gt;At the language/CLR level, &amp;quot;extern&amp;quot; requires an implementation at type load time. What we are doing in this case does not really require any changes at lower levels of the framework. &lt;/p&gt;
&lt;p&gt;The idea of using this kind of &amp;quot;expression factory&amp;quot; method is interesting. It may result in code that is easier to read than building the expressions directly as we do. However, in the case of our internal code and generated code, the simpler expressions we get when we use the current way seem to be a better choice.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Diego&lt;/p&gt;
</description></item><item><title>re: EDM and Store functions exposed in LINQ</title><link>http://blogs.msdn.com/efdesign/archive/2008/10/08/edm-and-store-functions-exposed-in-linq.aspx#8996568</link><pubDate>Sun, 12 Oct 2008 11:25:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8996568</guid><dc:creator>Zeeshan Hirani</dc:creator><description>&lt;p&gt;Diego,&lt;/p&gt;
&lt;p&gt;Thanks for the explanation. For returning partially filled entity, the only reason i had was it was easier to pas it across tiers as compared to anonymous types. LIke for databainding scenaious, I had some stored procedures that would execute some complicated query to return few columns for my entity. When i was doing linq to sql i got away but as i moved my app over entity framework, I struggled through fixing my stored procedure to meet EF needs. &amp;nbsp;More so I would need somethings from extensions to be moved to core product that i use on a day to day basis on my project. Like I would create a stored procedure in the database and map it to any clr type entity or not it doesn't matter. There is so much pain that one has to go through to use a stored procedure and if the stored procedure does not map to an entity, you are out of luck.&lt;/p&gt;
&lt;p&gt;what else.. let me think &lt;/p&gt;
&lt;p&gt;More esql operatos needs to be supported in queryview.&lt;/p&gt;
&lt;p&gt;Be able t specify at the mapping level the default sort to be used in case there is no sort provided for associations or entitysets. LIke the other day I had the need to apply a sort everywhere I am retrieving orders for customers to be sorted by order date.&lt;/p&gt;
&lt;p&gt;Wilson ormapper supported this..&lt;/p&gt;
&lt;p&gt;flexible stored procedure mapping. I want to returning idenity column using output paramters. I can hack it by using command text but i dont like that option. my list is endless so i will stop.&lt;/p&gt;
&lt;p&gt;But thanks for listening to our needs. I am very happy that i moved my project to EF, my code is much cleaner &amp;nbsp;from the linq to sql queries because now my model is complicated but get a new developer started with our model is much easier and quicker.&lt;/p&gt;
&lt;p&gt;Thks&lt;/p&gt;
</description></item><item><title>re: EDM and Store functions exposed in LINQ</title><link>http://blogs.msdn.com/efdesign/archive/2008/10/08/edm-and-store-functions-exposed-in-linq.aspx#9163823</link><pubDate>Tue, 02 Dec 2008 12:08:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9163823</guid><dc:creator>Alex Mineev (MSFT)</dc:creator><description>&lt;p&gt;Regarding the partially filled entities: you can define a function that will return entity refs instead of entities.&lt;/p&gt;
</description></item><item><title>Model Defined Functions</title><link>http://blogs.msdn.com/efdesign/archive/2008/10/08/edm-and-store-functions-exposed-in-linq.aspx#9301140</link><pubDate>Fri, 09 Jan 2009 04:55:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9301140</guid><dc:creator>Entity Framework Design</dc:creator><description>&lt;p&gt;Today the Entity Framework, and more specifically the Entity Data Model, have a limited notion of Functions.&lt;/p&gt;
</description></item><item><title>re: EDM and Store functions exposed in LINQ</title><link>http://blogs.msdn.com/efdesign/archive/2008/10/08/edm-and-store-functions-exposed-in-linq.aspx#9302652</link><pubDate>Sat, 10 Jan 2009 00:08:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9302652</guid><dc:creator>aaa</dc:creator><description>&lt;p&gt;what about sprocs with table valued parameters? very useful for bulk-inserts!&lt;/p&gt;
</description></item><item><title>Update on Computed Properties</title><link>http://blogs.msdn.com/efdesign/archive/2008/10/08/edm-and-store-functions-exposed-in-linq.aspx#9312722</link><pubDate>Tue, 13 Jan 2009 07:27:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9312722</guid><dc:creator>Entity Framework Design</dc:creator><description>&lt;p&gt;A while back I wrote a post that introduced the concept of Computed Properties . Since that time we’ve&lt;/p&gt;
</description></item></channel></rss>