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

    OData support in ASP.NET Web API

    • 52 Comments
    UPDATE 2 @1:21 pm on 16th August (PST): There is an updated version of the nuget package that resolves the previous dependency issues. Oh and my comments are now working again. UPDATE 1 @10:00 am on 16th August (PST): If you’ve tried using the...
  • Meta-Me

    Tip 23 – How to fake Enums in EF 4

    • 51 Comments
    As of right now Enums are not in EF4. Now we will be listening to your feedback about Beta1, and making some adjustments, so you never know, but at the moment it doesn’t look like they will be supported. Yesterday though I came up with a workaround...
  • Meta-Me

    OData in WebAPI – Microsoft ASP.NET Web API OData 0.2.0-alpha release

    • 30 Comments
    Since my last set of blog posts on OData support in WebAPI (see parts 1 & 2 ) we’ve been busy adding support for Server Driven Paging, Inheritance and OData Actions. Our latest alpha release on Nuget has preview level support for these features. Lets...
  • 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

    Tip 22 - How to make Include really Include

    • 22 Comments
    This is 22nd post in my ongoing series of Entity Framework Tips . If you want to do eager loading with the Entity Framework it is generally really easy, you simply write something like this: var results = from post in ctx.Posts.Include(“Comments”)...
  • Meta-Me

    Tip 26 – How to avoid database queries using Stub Entities

    • 21 Comments
    What are Stub Entities? A stub entity is a partially populated entity that stands in for the real thing. For example this: Category c = new Category {ID = 5}; is a stub entity. It has only the ID populated, which indicates this is a stub...
  • Meta-Me

    Tip 28 - How to implement an Eager Loading strategy

    • 20 Comments
    Background: Over the last 2 years lots of people have complained about the way Eager loading works in the Entity Framework, or rather the way you ask the Entity Framework to eagerly load. Here is how you do it: var results = from b in ctx.Blogs.Include...
  • Meta-Me

    OData in WebAPI – RC release

    • 20 Comments
    Next week we will release an official RC of the Microsoft ASP.NET WebAPI OData assembly. This marks the third release on our way to RTM.  Although this post talks about code that hasn’t been officially release yet, since all development is happening...
  • Meta-Me

    Tip 34 – How to work with Updatable Views

    • 16 Comments
    UPDATE: thanks Zeeshan for pointing out that by default only non-nullable columns end up in the key for view backed entities. Imagine this situation, you have a view in your database, and it is updatable. Next you decide to use this view with the Entity...
  • 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

    T CastByExample<T>(object o, T example)

    • 15 Comments
    So earlier today I was lamenting that an anonymous type can't be shared between functions with Wes Dyer , when he said "Well actually they can..." Cue me learning something cool. The first step is to create a seemingly innocent method: public...
  • Meta-Me

    Custom Data Service Providers

    • 14 Comments
    Introduction Data Services sits above a Data Service Provider, which is responsible for interacting with the underlying Data Source on behalf of the Data Service. Data Services ships with some internal providers, and makes it possible for you to...
  • Meta-Me

    Why can’t I efficiently compose method calls in SOA?

    • 14 Comments
    Imagine if you have these 3 methods: public Employee GetEmployee(string alias); public Department GetDepartment(Employee employee); public Employee GetManager(Department department); Now imagine if you want to find the Manager of the Department that some...
  • 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 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 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

    Tip 37 – How to do a Conditional Include

    • 13 Comments
    Problem Someone asked how to do a Conditional Include a couple of days ago on StackOverflow. They wanted to query for some entity (lets say Movies) and eager load some related items (lets say Reviews) but only if the reviews match some criteria (i.e....
  • Meta-Me

    Tip 18 – How to decide on a lifetime for your ObjectContext

    • 12 Comments
    One of the most common questions we get is how long should an ObjectContext should live. Options often cited include one per: Function Form Thread Application Plenty of people are asking these types of questions, case in point here is a question on Stackflow...
  • Meta-Me

    Another C# trick: Fluents, Inheritance and Extension Methods

    • 12 Comments
    Here’s a scenario which Damien and I encountered recently. We needed a way of specifying Facets for properties on Entities, i.e. things like Nullable , MaxLength , Precision etc. And we needed a class hierarchy because different types of properties...
  • Meta-Me

    Creating a Data Service Provider – Part 6 – Query Interactions

    • 11 Comments
    Whenever I find myself implementing a series of interfaces to plug into a framework or server, I always find myself wondering how the server will call my implementations. For me this is about forming a mental model to simplify how I think about what...
  • 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

    Tip 30 – How to use a custom database function

    • 11 Comments
    Imagine you have a database function like the DistanceBetween function in Nerd Dinner : CREATE FUNCTION [dbo].[DistanceBetween]( @Lat1 as real, @Long1 as real, @Lat2 as real, @Long2 as real) RETURNS real AS BEGIN … END And you want to use it...
  • Meta-Me

    Creating a Data Service Provider – Part 9 – Un-typed

    • 10 Comments
    Background info: This post builds on Parts 1 thru 8 which teach you how to create a typed Data Service Provider. But now the part we’ve all been waiting for- an un-typed DSP – which is what I expect most real world DSP implementations will be based on...
Page 1 of 7 (151 items) 12345»