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

    Creating a Data Service Provider – Part 3 - IDataServiceMetadataProvider

    • 10 Comments
    UPDATE: I’ve made a few updates to the code / write-up to reflect refactors I’ve made as I’ve implemented more of the interfaces. This is Part 3 of my ongoing series on Creating a Data Service Provider , and in this post we’ll look at how to implement...
  • Meta-Me

    Associations with Payloads

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

    Maybe I'm just a little slow...

    • 9 Comments
    But I only just realized that extension methods are cool for avoiding NullReferenceExceptions . We all know that if you have something like this: LicensePlate licensePlate = null ; Car car = licensePlate.Car; It will throw a NullReferenceException...
  • Meta-Me

    MEST - What is it and how does it work?

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

    Tip 19 – How to use Optimistic Concurrency with the Entity Framework

    • 9 Comments
    This is the 19th post in my ongoing series of Entity Framework Tips . Background: If you have a table with a timestamp column, and you reverse engineer an Entity from that table, you will end up with a Binary property in your entity (in my example...
  • 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

    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...
  • 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

    Intellisense : What properties are required?

    • 8 Comments
    Yesterday I was talking to a Simon, another super smart dev on the EF team, and he raised a big concern, one that I am sure you can all relate too: We've all seen something like this: And thought: "What is the bare minimum I can do here to save...
  • Meta-Me

    A silly C# trick from the trenches

    • 7 Comments
    UPDATE: as Joe rightly points out in the comments (thanks Joe) when you try to pass a Func<T,V> to a method expecting Action<T> using lambda syntax it doesn't fail. Somehow the compiler must realize there is no match for Func<T,V> and...
  • Meta-Me

    Tip 44 – How to navigate an OData compliant service

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

    Tip 24 – How to get the ObjectContext from an Entity

    • 7 Comments
    Customers often ask how to get from an Entity back to the ObjectContext . Now generally we don’t recommend trying this. But sometimes you really need a way to get to the ObjectContext . For example if you are in method and all you have is the Entity...
  • Meta-Me

    Web API [Queryable] current support and tentative roadmap

    • 7 Comments
    The recent preview release of OData support in Web API is very exciting (see the new nuget package and codeplex project ). For the most part it is compatible with the previous [Queryable] support because it supports the same OData query options. That...
  • Meta-Me

    Tip 20 – How to deal with Fixed Length Keys

    • 6 Comments
    This is 20th post in my ongoing series of Entity Framework Tips . Fixed Length Field Padding: If you have an fixed length column in the database, for example something like NCHAR(10) when you do an insert, padding happens automatically. So for example...
  • Meta-Me

    SaveChanges(false)

    • 6 Comments
    Most of the time the Entity Framework (EF) can manage transactions for you. Every time you Add an Entity, Delete an Entity, Change an Entity, Create a Relationship or Delete a Relationship in your .NET code, these changes are remembered by the EF, and...
  • Meta-Me

    Tagging File Systems?

    • 6 Comments
    I had an interesting in passing conversation with someone today about tagging file systems… which reminded me of my own sordid past. Before I joined Microsoft, before I was an MVP, before I released Base4, I wrote something called XTend. At the time I...
  • 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

    Tip 36 – How to Construct by Query

    • 6 Comments
    While writing my tips series and writing EF controllers for MVC I found that I regularly wanted to create and attach a stub entity . Unfortunately it isn’t quite that simple, you have to make sure the entity isn’t already attached first, otherwise...
  • Meta-Me

    Tip 33 – How cascade delete really works in EF

    • 6 Comments
    Imagine that in your database you have a cascade delete on an FK relationship. Something like this: Here the Delete Rule says that when a Category is deleted all the related Products should be deleted too. If you generate an EF model from this database...
  • Meta-Me

    Tip 50 – How to query a Data Service using JQuery

    • 6 Comments
    Recently I’ve been spending some of my time playing with JQuery . And because Data Services can expose data in JSON format, I thought I’d use JQuery to grab some data from a Data Service. Turns out it is pretty simple. This example isn’t going...
  • Meta-Me

    Is hiding lower level APIs bad?

    • 6 Comments
    There are many good arguments for hiding away the lower layers in your stack – essentially the building blocks upon which your public API is built - however the ‘ we don’t have the time and resources to test that layer completely ’ argument seems a little...
  • Meta-Me

    Nullable=”False”… but when exactly?

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

    Ordering of Commands – What do you think?

    • 5 Comments
    Some of our customers write code like this: ctx.AddToCustomers(customer); ctx.AddToProducts(product1); ctx.AddToProducts(product2); And expect the Entity Framework to issue 3 insert commands in the same order. Today the EF doesn’t preserve this sort of...
  • Meta-Me

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

    • 5 Comments
    Okay so we've got to the interesting bit at last. We've hooked up our extension method, we've got a query for filtering the records we are updating, we've got a map from object Properties to database Columns. So now comes the interesting bit... ...
  • 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...
Page 2 of 7 (151 items) 12345»