Browse by Tags

Tagged Content List
  • Blog Post: Tip 44 – How to navigate an OData compliant service

    I recently did a crash course in Data Services and OData . While doing so I realized my notes might be useful for you guys. So here is my little cheat sheet to quickly get up to speed with OData Urls. Note: OData Services may not necessarily support all of the following features: but if they do, this...
  • Blog Post: Tip 4 - Conceptual Schema Definition Language Rules

    The first version of the Entity Framework was released a while back ago now with .NET 3.5 SP1. One of the most glaring holes in the Entity Framework documentation was the lack of a formal document describing the Conceptual Schema Definition Language or CSDL. The CSDL for those who are wondering...
  • Blog Post: Side effects of first class Associations

    You've probably all heard someone say that Entity Data Model (EDM) and more specifically the Entity Framework (EF) treat associations as first class concepts. This sentence, seems reasonably benign, but it has a profound effect on the Entity Framework's behavior. Allow me to illustrate by...
  • Blog Post: Composable Services

    Dru Sellers just used a term I haven’t heard before, Composable Services . For me it the very timely term, because it succinctly describes a whole lot of Astronaut Architect dreaming I’ve been doing for the last 2 years. I recently started twittering as adjames *, and I’ve noticed, the stream of consciousness...
  • Blog Post: Nullable=”False”… but when exactly?

    If you look at the EDM and in particular the metadata it considers important, one thing is clear: Persistence is the Priority . For example this: <Property Name=”Firstname” Type=”String” Nullable=”False”/> Tells us that the Firstname property can’t be null when persisted. If however the EDM Type...
  • Blog Post: EDM misconceptions

    Recently I've seen a few slide decks on Entity Framework's architecture that have made me cringe. Their crime: mislabeling an EDMX file as EDM. Now without doubt, you have to be a hard core metadata freak like me to find this offensive. But take my word for it that X is super important, for...
  • Blog Post: MEST - What is it and how does it work?

    MEST stands for M ultiple E ntity S ets per T ype. It is one of the features of the Entity Framework that is typically missing from ORM stacks. The idea is that you can store the same EntityType in multiple EntitySets. For the purposes of this discussion you can think of EntitySets as analogous to Tables...
  • Blog Post: Fantasy Soccer - Part 4 - Architectural Overview

    Okay this Fantasy Soccer thing has got me thinking. What is this thing going to look like from about 100,000 feet? I.e. what are the big bits? Well being a pure geek, I really want to play with new shiny stuff (i.e. the new ASP.NET MVC Framework ) but that has to be balanced against a desire to be real...
  • Blog Post: Fantasy Soccer - Part 2 - an overview of the rules

    Yes, yes I know the real name of Soccer is Football , but I don't want there to be any confusion for any Americans, Australians or New Zealanders who might be reading this ;) So what are the basic rules of Fantasy Soccer? The Basic idea is that you get some fantasy money, lets say $100,000,000...
  • Blog Post: Real world App - Part 1 - Choosing an Application

    Okay so it has been a while since I posted my Statement of Intent . Time to get on with things. The main problem has been trying to come up with a good application. I gave myself three key requirements: Well suited to the web. Ability to grow uncontrollably in scope: so as to include hooks...
  • Blog Post: Statement of Intent

    This blog has been a little quiet for a while now. With good reason though. I've been doing the hard yards answering questions on the Entity Framework forum . To do so I had to ask literally hundreds of questions of the rest of the Entity Framework team. Guys like Colin must be completely sick of me...
  • Blog Post: Associations with Payloads - closing the loop

    I'm assuming you've read part 1 and part 2 , if not why not? Just kidding, they will make this post a little easier to understand though. I'm going to show you how to create a read-only association with a Payload. Okay so imagine you have this model: And you want to have be able to do this...
  • Blog Post: Associations with Payloads - part Deux

    Okay so the 'cat is out of the bag' you CAN do associations with Payloads... Sort of . Now for an explanation of what I meant by 'Sort of'. Let's dream a little and imagine how it might work in an ideal world. Imagine something like this: Product p = ...; Order o = ...; o.Products.Add(p); Under the hood...
  • Blog Post: Associations with Payloads

    Those of you who know what I am talking about will probably also know that we have been saying publicly that the Entity Framework doesn't support them. Now for those who don't know what an association with a payload is, imagine something like: Order <- (1-*) -> OrderLine <- (*-1) ->...
  • Blog Post: Rolling your own SQL Update on-top of the Entity Framework - Part 1

    One of the current limitations of the Entity Framework, is that in order to modify an entity you have to first bring it into memory. Now in most scenarios this is just fine. There are however some bulk update cases where performance suffers somewhat. For example imagine if you need to move all unshipped...
  • Blog Post: ObjectQuery<T>.ToTraceString() and possibilities...

    So in Beta3 of the EntityFramework (due out very soon) the team added a new function to ObjectQuery <T> that allows you to get the native Query that would be evaluated if you enumerated. I.e. if you are using the System.Data.SqlClient that would be the TSQL. This is very handy because it means...
  • Blog Post: Hydrating a DataTable from an EntityDataReader - Part 2

    See yesterday's post for some context... So we can't rely on EntityDataReader . GetSchemaTable() and a DataAdapter to do the filling of our DataTable for us. We have to do it ourselves. As with any problem the first step is to define the steps: Get a DataTable with a shape that matches the...
  • Blog Post: Hydrating a DataTable from an EntityDataReader - part 1

    Okay so about 5 posts back I promised: "...At this point we have an enumeration of all EntitySet s available. In the next post I explain how we can use that…" Well better late than never... If you remember last time I showed you this piece of code: MetadataWorkspace workspace = conn.GetMetadataWorkspace...
  • Blog Post: Dude where is my query going to run?

    One of the key decisions with LINQ to Entities (L2E) is that all predicates in an L2E expression must be converted into store expressions, so that the store does all the heavy lifting. This means for example if you try the following: var matches = from e in ctx.Employees where IsTopPerformer(e...
  • Blog Post: Compiled Queries and the EntityFramework

    For a while LINQ to SQL has had compiled Queries... and now in Beta3 of the Entity Framework, due out soon, we have them too. The idea behind compiled queries is that you don't want to re-process the same LINQ expression every time it is encountered. Instead you want to pre-compile the LINQ expression...
  • Blog Post: Using a random model at runtime

    In my last post I hinted that using the Entity Frameworks Value layer and Metadata allows you to work against any Entity Data Model in a loosely coupled way. Let’s see how… So let’s imagine you are working against the Value layer. With code something like this: using ( EntityConnection conn...
  • Blog Post: Metadata, Objects and Values

    One of the things I am doing at the moment is writing a bunch of Entity Framework code with one common theme, leveraging metadata. In the spirit of transparency here is what I have learnt (just this, nothing else at all...) When working with the entity framework from the developer perspective there...
  • Blog Post: Introductions

    Seeing as this is my first post on this blog, a few things about me are in order. My name is Alex James, a new Microsoft employee, based in Redmond. My family and I have moved to Seattle from NZ just so I could take this job. Now NZ is a pretty nice place, so as you can imagine I hold high hopes for...
Page 1 of 1 (23 items)