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

    Associations with Payloads - closing the loop

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

    Associations with Payloads - part Deux

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

    CQRS with OData and Actions?

    • 5 Comments
    I love the Actions feature in OData – which is hardly surprising given I was one of its designers.  Here’s the main reason why I love it: Actions allow you move from a CRUD architecture style, where you query and modify data using the same model...
  • Meta-Me

    EDM misconceptions

    • 5 Comments
    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...
  • 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 55 - How to extend an IQueryable by wrapping it.

    • 5 Comments
    Over the last couple of years I’ve found myself in lots of situations where I’ve wanted to get ‘under the hood’ and see what is happening inside an IQueryable, but I haven’t had an easy solution, at least until now. Getting down and dirty like this...
  • Meta-Me

    Tip 40 – How to materialize presentation models via L2E

    • 5 Comments
    Problem: Imagine that you have these entities public class Product { public int ID { get; set; } public string Name { get; set; } public virtual Category Category { get; set; } } public class Category { public int ID { get; set; } public string Name ...
  • Meta-Me

    Tip 42 – How to create a dynamic model using Code-Only

    • 5 Comments
    Background: When we give examples of how to use Code-Only we always start with a strongly typed Context derived from ObjectContext . This class is used to bootstrap the model. For example this (property bodies omitted for simplicity sake): public...
  • Meta-Me

    State vs Statement of Intent

    • 5 Comments
    Well I went to Vegas for Dev Connections. What an experience. Never been there before, but for first two days I was too worried about my two talks to take much in. My first talk was Entity Framework in a world of Services and Processes . My old...
  • 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 25 – How to Get Entities by key the easy way

    • 5 Comments
    Sometimes rather than writing this: var customer = ctx.Customers.First(c => c.ID == 5); You would rather write something like this: var customer = ctx.Customers.GetCustomerById(5); In .NET 4.0 this would be trivial to do by modifying the...
  • Meta-Me

    Tip 27 – How to Implement BeforeSave Validation

    • 4 Comments
    It is common to want to validate that your entities are ‘valid’ before you save them to the database. A naive form of validation might be to try to ensure that your entities are ‘valid’ before you add them to the context, but this doesn’t help you if...
  • Meta-Me

    Statement of Intent

    • 4 Comments
    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...
  • 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 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 41 – How to execute T-SQL directly against the database

    • 4 Comments
    Sometimes you’ll find you need to issue a query or command that the Entity Framework can’t support. In fact this problem is common to most ORMs, which is why so many of them have a backdoor to the database. The Entity Framework has a backdoor too… .NET...
  • Meta-Me

    Tip 35 – How to write OfTypeOnly<TEntity>()

    • 4 Comments
    If you write a LINQ to Entities query like this: var results = from c in ctx.Vehicles.OfType<Car>() select c; It will bring back, Cars and any type that derives from Car, like say SportCar or SUV. If you just want Cars and you don’t want...
  • Meta-Me

    Using a random model at runtime

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

    Tip 49 – How to find your Data Service bug

    • 4 Comments
    I’ve been playing around with creating a custom Astoria Data Service Provider , aka DSP, for a while now. So far I’d managed to get my metadata all setup, so browsing to $metadata works great. I’d got a few simple queries work. Basically everything was...
  • Meta-Me

    Fantasy Soccer - part 3 - Unit of Measure

    • 4 Comments
    Today I spent a bit of time working on the data model for my fantasy soccer application. I don't want to talk about the actual model today though, because I'm not really ready. What I want to do is talk about a problem that occurred to me, namely...
  • Meta-Me

    Creating a Data Service Provider – Part 5 - Query

    • 4 Comments
    In Part 4 of our series showing how to implement a Custom Data Service Provider we hooked up an incomplete implementation of IDataServiceQueryProvider , just enough to get the ServiceDocument and $metadata working. In this part we’ll get query working...
  • Meta-Me

    CommandBehavior.SequentialAccess

    • 4 Comments
    So why does this: EntityDataReader reader = command.ExecuteReader(); Throw an exception? Well it is to-do with correctness and setting expectations. First things first, this is what you should do: EntityDataReader reader = command.ExecuteReader...
  • Meta-Me

    Rolling your own SQL Update on-top of the Entity Framework - Part 3

    • 4 Comments
    Okay, okay, okay... yes I know this is the slowest moving series in the history of blogging (sorry Roger J). Now, when a blog post starts like that, you would probably expect the next sentence to begin with "But" or "However", not this time though...
  • Meta-Me

    Real world App - Part 1 - Choosing an Application

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

    Rolling your own SQL Update on-top of the Entity Framework - Part 1

    • 4 Comments
    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....
Page 3 of 7 (151 items) 12345»