Posted By: Charles | Dec 5th, 2007 @ 8:53 AM | 23,790 Views | 20 Comments

You've seen a few conversations on Channel 9 about Microsoft's Entity Framework. Well, it's time for another one, but with a new twist...

Brian Beckman recently had a deep technical chat with Sam Druker about the Entity Framework data model and related technologies.

Sam is GM of the Data Programmability Group at Microsoft and also happens to be Brian's boss and former programming colleague. Sam's a very technically-inclined executive... He has to be considering he's a leader in the Microsoft group that makes SQL and the plethora of data-related platform technologies, not to mention that he has to manage the likes of Erik Meijer and Brian Beckman.

This interview is great for two simple reasons. The first reason is that, well, it's a great (and deep, including whiteboarding) conversation between experts that spans many technologies related to SQL and the Entity Framework.

The second reason is that this is the first in a series of interviews on Channel 9 that involve experts in one domain (or many domains, like Brian) who interview other experts in another domain that is not well understood by the interviewer (so, in this case, for example, the venerable Brian Beckman really does not ask any questions that he already knows the answer to. Brian is not an expert in EF, but possesses a very unique perspective in this case given his mathematical tendencies and expert level understanding of things like set theory...). Yours truly, Charles, takes part in the conversation of course, but I'm mainly a camera guy who throws in a random question once and a while. Brian drives this interview.

Like you, I'm in the audience and learning from people who truly understand the deepest levels of a given platform technology. Again, Brian Beckman conducts this interview and I think this is a trend you are going to really enjoy.

Thank you, Brian and Sam!

You'll see more of this class of interview in the future on Channel 9.

Learn. Enjoy.

Media Downloads:
Rating:
1
0
Very interesting stuff. I have faced the problem of constructing a view from multiple sources on multiple occasions, while maintaining the ability to update and/or insert new data. This framework really sounds like a solution for this problem. Or am I on the wrong track here? Like it would be great if could composite data from multiple database sources and/or other kinds of data objects/structures, because this would greatly reduce the cost and effort to be put into connecting different (software)systems together.
I never understood the entity framework, but now I do.  It seems very interesting.

Currently, I have a data access class I wrote called "StoredProcedure".  I then have code generators to create the stored procedures, and the VB.NET classes.  It's specific to the type of operation, such as insert, update, delete, select as output params, select multiple, etc.

Although I think it's very clean, replacing all of that with the entity framework, if it's clean and is performant, would be great.

However, the stored procedure class I created offers quite a bit and has some intelligence in it.  For example, formating the sproc name, validation, not adding certain parameters if they don't pass validation and that parameter has a default, etc.

Also, I plan on adding possibly some type of load balancing to it, possibly based on the stored procedure name (or parameter specifiying read only or data is modified by this sproc), and also user based specific connection strings.  (This way, for example, you can setup mirroing database, and have the read-only stored procedures executed on the mirrored database.)

I'd be curious to see if the entity framework would be able to do this as well, and\or whether or not you can inherit and modify certain objects that are responsible for this.

staceyw
staceyw
Before C# there was darkness...

Thanks to all.  Very informative.  However I am still wondering where the business logic goes?  My brain wants it to go inside the EF so I can code it in 1 place using c# (for example) and not have it sprinkled all over the client, BLL, and sprocs in the server.  Is this the case?  Do I use code-behind to add my BL inside the EF and it travels with the EF?  If so, great, I would like to see a video on it.  Also, personally, I would like to never have to switch into tsql again as I don't like moving between DSL and keeping those all fresh in my head, plus all the added complexity.  Will we be able to code our sprocs inside the EF using .Net?

Also, as you hinted to.  It seems to me that the model I really want is have the EF be exposed as a service on the server side.  Then my client can connect to it (using Linq) using a client side EF provider.  So it will look and feel like DLinq, but will be talking to EF front end instead of ADO/DB directly.

And what I "really" want to do someday is this from the client:

Future<Customer[]> f = Future.Create(() =>
    {
        return DB.Customers.Where(c=>c.Active==true);
    });

ObjectDumper.Write(f.Value); // Wait and print active Custs.

So this "ships" the Func to the Server (i.e. does not convert to TSql).  And the server processes Func directly (like a dynamic sproc). So it is like directly passing a sproc right into the server and getting results.  Objects are not created or serialized until rehydrated on the client, the stream from server to client would be byte[] (i.e. not xml).

Thanks much.

Cyonix
Cyonix
Me
Cool video. Charles can you get an interview with the guy Microsoft just hired that created SubSonic? I want to know if he is going to move SubSonic over to EF.

I'm looking forward to more videos from Brian
littleguru
littleguru
<3 Seattle
Cyonix wrote:
I'm looking forward to more videos from Brian


Indeed. Great videos! "Expert To Expert" sounds very cool btw.
littleguru
littleguru
<3 Seattle
Charles wrote:
What do you think of this format: expert to expert?
C


AWESOME! I had a "brain wave" (if you want to call it that way) a few hours ago. Why not throw a few experts together and let them defent their technology against each other? I don't know if that is doable but sounds very cool to me...
Cyonix
Cyonix
Me
Charles wrote:
What do you think of this format: expert to expert?
C
I love the new format expert to expert is a great idea
Cyonix
Cyonix
Me
littleguru wrote:

Charles wrote: What do you think of this format: expert to expert?
C


AWESOME! I had a "brain wave" (if you want to call it that way) a few hours ago. Why not throw a few experts together and let them defent their technology against each other? I don't know if that is doable but sounds very cool to me...
haha like "expert death match" Wink

Charles sort of already did it with functional vs. imperative at JAOO. I think that could be revisited because all those guys seemed pretty set on functional languages. I want a diehard imperative guy to take on a diehard functional guy haha
Microsoft Communities