Yes you can execute PARAMETERIZED sprocs with EF Fluent API Code Only (and more!)

This is really an add-on to this post here. Turns out most people were only thinking that you could execute SQL strings only as opposed to detailed parameterized SQL statements. That’s not correct. It’s all supported and approved. Scenario 1. Using Parameterized SQL statements So this covers selects as well as invoking sprocs. If you…

0

Estimating the size a cube

where the set of D is dimensions and the set of M is measures. Let F(x) calculate the number of members and G(x) the size of the member.   Debate.  edit: I should have noted this is the approximation of the size. Depending on storage system there’s obviously overhead to this.

1

Yes you can execute sprocs with EF Fluent API Code Only

OK let’s make this clear. You can totally call SQL Functions, SQL SPROCS, or any other raw SQL statement and use it in EF Code Only. What you don’t get is automatic or fluent API configuration statements that perform this mapping work for you and by default, no tracking occurs on the materialized objects (though…

1

Map private properties with EF Fluent API

So until we get EF 4.2 and the support for enumerations as first class citizens those of us needing support have resigned ourselves to the simple fact that we are forced to expose a property for the integer value for EF to use and wrap that value with a convenience property that casts it as…

3

Interested in POCO Entity Framework 4?

Editorial note: EF 4.1 was released as part of the .Net 4 Platform Update 1 release. You should use the information at http://blogs.msdn.com/b/adonet/archive/2011/04/11/ef-4-1-released.aspx for training now. For those of you interested in POCO In EF4, here’s a list of links that you should read to grok: http://blogs.msdn.com/b/adonet/archive/2009/05/21/poco-in-the-entity-framework-part-1-the-experience.aspx http://blogs.msdn.com/b/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx http://blogs.msdn.com/b/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx http://blogs.msdn.com/b/adonet/archive/2009/06/16/using-repository-and-unit-of-work-patterns-with-entity-framework-4-0.aspx http://blogs.msdn.com/b/adonet/archive/2009/06/22/feature-ctp-walkthrough-code-only-for-the-entity-framework.aspx http://blogs.msdn.com/b/efdesign/archive/2009/08/03/code-only-enhancements.aspx http://blogs.msdn.com/b/efdesign/archive/2009/10/12/code-only-further-enhancements.aspx And if you are…

0

Unit Testing Repositories, a rebuttal. Or "How to use proper decoupling to unit test the repository pattern"

For primers, you need to read this post first: http://buffered.io/2008/07/29/unit-tests-boldly-crossing-boundaries-and-gently-breaking-rules/ So the other day I received an email from a group that I am assisting in understanding TDD, Test Concepts, and Separation of Concerns, and they asked, “Is this relevant”? Well here’s the reply to them. Relevant: Yes and no.There’s some good conversation going on…

0

DataServices, IErrorHandlers, Exceptions and the Gulf between them.

OK I am going to let you in on a dirty little secret about Astoria based services. This secret is probably not even known to you. Ready to hear it? Really? Well here it is:  You’d better never have anything go wrong as you’ll never know it. It devours exceptions and is hungry for more!…

2

Query Providers ARE Still Data Access Code!!

So everyone reading this (or at least hopefully everyone) will know that putting data access logic into the UI is anti-pattern of all anti-patterns. I am going to sidestep the issue of simple utilities and one-off screens and trivial applications for the purposes of this discussion. We’re instead focusing on real applications with non trivial…

0

Server Side Pagination in T-SQL / LINQ

OK it came as a shock to me that so many people were building huge sets of query data that they are binding in their UI and then deciding to page it at like 10 rows per page. I’m not talking about 1 or 2 or even 3 pages of data, I’m talking about hundreds…

0