Blog - About

About Meta-Me

Hi,

My name is Alex James, a Program Manager working on the Data Services team at Microsoft.

My current focus is OData and improving the usability of Data Services, both client and server side.

Previously I worked on the Entity Framework team where I helped create EF 4.0, and CodeOnly.

I'm also really passionate about Metadata, hence the name Meta-me.

Cheers
Alex

I waffle and twitter as adjames

  • Meta-Me

    Tip 17 – How to do one step updates with AttachAsModified(..)

    • 2 Comments
    Background: In Tip 13 - How to Attach the easy way I showed you how to ‘establish’ the EntitySet for a particular CLR Type so you could Attach it. But in all the tips so far the same basic pattern is used: Attach the original version of the Entity Modify...
  • Meta-Me

    Video on Entity Framework’s Model First in .NET 4.0

    • 1 Comments
    How did I miss this ? Jonathan Carter (aka LostInTangent ) has done a Channel 9 video on our upcoming Model First experience. Model first was announced a while back here .
  • Meta-Me

    Tip 16 – How to mimic .NET 4.0’s ObjectSet<T> today

    • 9 Comments
    Background: In order to be an EF power user today you really need to be familiar with EntitySets . For example you need to understand EntitySets in order to use AttachTo(…) or create EntityKeys . In most cases there is only one possible EntitySet...
  • Meta-Me

    Interesting reads

    • 3 Comments
    Over the weekend in between run throughs that I did prepping for a webcast, I did some catch-up blog reading. Lots of interesting stuff. Recording and sharing here for posterity: Entity Framework Simon Segal has a interesting post on Entity Framework...
  • Meta-Me

    Corrected Tip 15 - How to avoid loading unnecessary properties

    • 1 Comments
    I've made a few important corrections to Tip 15 . I've corrected the bit that said the UPDATE SQL includes original values of Updated Properties in the WHERE clause. At the time I was consciously attempting to simplify things a little, but as Tanveer...
  • Meta-Me

    Tip 15 - How to avoid loading unnecessary Properties

    • 4 Comments
    UPDATE: Made a couple of important corrections re-which Original Values are required. Problem: Imagine if you query blog posts: var myPosts = from post in ctx.Posts orderby post.Created descending select post; Just so you can output the post...
  • Meta-Me

    Tip 14 - How to cache Entity Framework Reference Data

    • 13 Comments
    Scenario: In order to make applications perform it makes a lot of sense to cache commonly used reference data. Good examples of reference data include things like States, Countries, Departments etc. Generally you want to have this data readily at hand...
  • Meta-Me

    An analogy: Good UIs and Fluent APIs

    • 5 Comments
    Background A while back I was writing a web app to try the Entity Framework and MVC together. I knew the pain points would probably be around Foreign Keys, or at least the lack of them in .NET 3.5 SP1 (FKs are now available by default in .NET 4...
  • Meta-Me

    Tip 13 - How to Attach an Entity the easy way

    • 13 Comments
    The Problem: In some of earlier tips we talked about using Attach to load things into the ObjectContext in the unchanged state without wearing the cost of doing a query. Attach is the weapon of choice if performance is your goal. Unfortunately our APIs...
  • Meta-Me

    Tip 12 - How to choose an Inheritance Strategy

    • 13 Comments
    What strategies does the Entity Framework support? The Entity Framework supports 3 primary inheritance strategies: Table Per Hierarchy (TPH): In TPH, all data for a type hierarchy is stored in one table, and there is a discriminator column that is used...
  • Meta-Me

    Tip 11 – How to avoid Relationship Span

    • 5 Comments
    Background and Motivation: In my last post on EF Jargon I introduced the concept of Relationship Span. If you remember Relationship Span is basically responsible for compensating for the lack of Foreign Key properties* in your Entity. Relationship...
  • Meta-Me

    Tip 10 - How to understand Entity Framework jargon

    • 4 Comments
    The Entity Framework is pretty big, so when the Entity Framework team talks about things internally we tend to use jargon to increase communication 'bandwidth'. Unfortunately sometimes we let this Jargon slip into our APIs and communication. Now...
  • Meta-Me

    Tip 9 – How to delete an object without retrieving it

    • 16 Comments
    Problem The most common way to delete an Entity in the Entity Framework is to pull the Entity you want to delete into the context and then delete it like this: // Find a category by ID by // TRIVIA: in .NET 4.0 you can use .Single() // which will throw...
  • Meta-Me

    Tip 8 - How to write 'WHERE IN' style queries using LINQ to Entities

    • 28 Comments
    Imagine if you have a table of People and you want to retrieve only those whose the Firstname is in a list of interesting firstnames. This is trivial in SQL, you write something like this: SELECT * FROM People WHERE Firstname IN ('Alex', 'Colin', ...
  • Meta-Me

    Tips and Tricks

    • 25 Comments
    Hopefully if you're reading this you've noticed that I've started a series of Tips recently. The tips will mostly apply to Entity Framework or Data Services. Seeing as I expect to have a lots of tips, it probably makes sense to have some sort of...
  • Meta-Me

    Tip 7 - How to fake Foreign Key Properties in .NET 3.5 SP1

    • 22 Comments
    Background If you've been reading the EF Design Blog you will have seen that we recently announced something called " FK Associations " for the EF in .NET 4.0. However in .NET 3.5 SP1, we only support Independent Associations. What that means is that...
  • Meta-Me

    Self-Tracking Entities

    • 1 Comments
    Some of the feedback we got on the EF design blog about our early N-Tier plans , highlighted that lots of people just want the whole "tier thing" to just work out of the box. Fortunately now that we have adopted T4 to generate our entities we have...
  • Meta-Me

    Tip 6 - How and when to use eager loading

    • 5 Comments
    When should you use eager loading? Usually in your application you know what you are going to "do" with an entity once you have retrieved it. For example if you retrieve an order so you can re-print it for a customer, you know that the re-print would...
  • Meta-Me

    Tip 5 - How to restrict the types returned from an EF Query.

    • 9 Comments
    Imagine you have a model that looks like this: How do you query for just Cars? This is where OfType<SubType>() comes in. You write something like this: var onlyCars = from car in ctx.Vehicles.OfType< Car >() select car; And...
  • Meta-Me

    Tip 4 - Conceptual Schema Definition Language Rules

    • 2 Comments
    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...
  • Meta-Me

    Tip 3 - How to get started with T4

    • 11 Comments
    So if you've been reading the Entity Framework Design Blog you will have heard us talk about T4 . It is a technology that ships with Visual Studio 2008 (and 2005 as a separate download). In .NET 4.0 the Entity Framework is leverage T4 to help with...
  • Meta-Me

    Alt.NET Seattle

    • 1 Comments
    I went to Alt.NET Seattle on the weekend. Being from the Entity Framework team, I was a little nervous about how I'd be received. Well I definitely shouldn't have worried... everyone was very civil. In the broader sense I wasn't sure what to expect...
  • Meta-Me

    Tip 2 - Entity Framework Books

    • 1 Comments
    Question: Where do I find in depth books on the Entity Framework? Answer: One of the benefits of being on a product team a Microsoft is you get authors who want you to review their books. So far to date I've have had 3 different authors send...
  • Meta-Me

    Tip 1 - How to sort Relationships in Entity Framework

    • 6 Comments
    Question: One of the questions you often see in the Entity Framework Forums is around sorting related items. For example imagine if you want to query customers, and return only those that have accounts more than 30 days in arrears, and at the same...
  • Meta-Me

    Side effects of first class Associations

    • 9 Comments
    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...
Page 4 of 7 (151 items) «23456»