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

    ObjectQuery<T>.ToTraceString() and possibilities...

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

    I never knew: C# method overloads can return different types

    • 4 Comments
    I came to C# from Java, which I’m pretty sure doesn’t (or maybe didn't) allow this, so I was super surprised today when I learnt that C# method overloads can have different return types. So this class is completely valid: public class Foo { public...
  • Meta-Me

    Hydrating a DataTable from an EntityDataReader - part 1

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

    LINQ to non-enumerable?

    • 3 Comments
    So I was reading Wes' latest post about Monad's a while back (which incidentally is well worth a read, it is the first good explanation of Monad 's I've seen that uses a language I am comfortable with in it's examples, namely C#). Well one thing Wes...
  • Meta-Me

    LINQ to Objects and Buffer<T>

    • 3 Comments
    I was debugging a problem a couple of days ago, when I learned something interesting. I had some code that looked like this: foreach(Employee e in manager.Manages) { … } The manager.Manages property returned a custom implementation of ICollection<Employee>...
  • Meta-Me

    Maybe there is more

    • 3 Comments
    Michel Perfetti , has taken my little Maybe thingie and gone a lot further , by using expression tree re-writting he has made it possible to express this: string code = licensePlate.Maybe(lp => lp.Car) .Maybe(c => c.Owner) .Maybe(o => o...
  • 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

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

    • 3 Comments
    Okay so it has taken me a while to get to the second part of this post... but as they say better late than never. As I've said before when designing this sort of API, I always like to start with the end in mind... this is what I want the Update() method...
  • Meta-Me

    Code-Only best practices

    • 3 Comments
    There have been lots of posts on the EFDesign blog talking about how the features in Code Only have evolved. But very little covering what we think will be the best way to write the code. You may have seen code like this: var prodConf = builder.Entity<Product>...
  • Meta-Me

    All the power at your disposal

    • 3 Comments
    I invite you to take a look at this forum post from 'Benys' It illustrates the power of the Entity Framework's mapping capabilities + partial classes. The short answer to a lot of "Does the EF support ... ?" type questions is often no. Often however the...
  • Meta-Me

    Creating a Data Service Provider – Part 7 – Update

    • 3 Comments
    In Parts 1 thru 6 we created a custom Read/Only provider over an in memory list of Products. Now it’s time to add update support. To do that we need to add an implementation of IDataServiceUpdateProvider . But first lets talk about the… Implications...
  • Meta-Me

    Tip 45 – How to swap EF metadata at runtime.

    • 3 Comments
    Background By default the Entity Framework embeds its metadata inside your assembly as a resource. It also puts a connection string in the App or Web Config that references those resources something like this: <add name="BloggingEntities" connectionString...
  • Meta-Me

    Tip 21 – How to use the Single() operator – EF 4.0 only

    • 3 Comments
    This is 21st post in my ongoing series of Entity Framework Tips , and the first that is specific to EF 4.0. Entity Framework 4.0 Beta 1 As you’ve probably heard VS 2010 Beta 1 is now available to subscribers which means some of you can get your hands...
  • Meta-Me

    Some comments on efficient SOA method composition

    • 2 Comments
    A couple of posts back I started talking about composing SOAPY operations efficiently, by shipping intent to the service. An interesting debate ensued in my comments: Kristofer (the guy behind the Huagati tools for DBML and EDMX , and it seems a man after...
  • 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

    Tip 31 – How to compose L2O and L2E queries

    • 2 Comments
    Imagine you want to write a query like this: var possibleBuyers= from p in ctx.People where p.Address.City == “Sammamish” && InMarketForAHouse(p) select p; Now theoretically this is possible so long as there is a SQL translation for InMarketForAHouse...
  • Meta-Me

    TechEd 2010 Videos

    • 2 Comments
    If you didn't get to TechEd - no problem - videos of all the sessions are available here . Including my Best Practices: Creating an OData Service using WCF Data Services session . If you watch that video and want to follow try it out - you can download...
  • 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 47 – How fix-up can make it hard to change relationships

    • 2 Comments
    Problem: Take this code: Category oldCategory = ctx.Categories .Include("Products") .First(c => c.Name == "Drink"); Category newCategory = new Category {Name = "Beverage"}; foreach(Product product in oldCategory.Products) { newCategory.Products...
  • Meta-Me

    Tip 51 – How to load EF metadata from arbitrary streams

    • 2 Comments
    In Tip 45 I showed you how to build a connection string at runtime, which is pretty nifty. The problem with that was that it relies on having metadata files (.csdl .ssdl and .msl) on local disk. But what if they live on a web-server or something...
  • Meta-Me

    Tip 52 – How to re-use Types with the Data Services client

    • 2 Comments
    By default when you add a Data Service Service Reference you get automatic code-generation, which produces a strongly typed DataServiceContext and classes for all your ResourceTypes. You can have a look at this generated code if you ‘show all files...
  • Meta-Me

    Tip 53 – How to debug EF POCO mapping issues

    • 2 Comments
    If you are trying to use POCO classes in EF 4.0, it is relatively easy to run into problems with the mapping from your model to your CLR classes. If you get any nasty problems here, the best way to get to the bottom of things is to try to explicitly...
  • Meta-Me

    Tip 54 – How to improve performance using Statement Expressions

    • 2 Comments
    Background: While writing the update post in my Data Service Provider series I ended up writing this block of reflection code to copy properties values from one object to another: foreach (var prop in resourceType .Properties .Where(p => (p.Kind &...
  • Meta-Me

    Tip 56 - Writing an OData Service using the Reflection Provider

    • 2 Comments
    At TechEd I got a lot of questions about how to expose Data as OData By now you probably know you can use Data Services and the Entity Framework to expose data from a database as an OData Service. You might even know you can use Data Services with...
  • Meta-Me

    Creating a Data Service Provider – Part 8 - Relationships

    • 2 Comments
    In parts 1 thru 7 we made a Read / Write typed data service provider, although it was a little simplistic because it didn’t have relationships. So lets rectify that right now by adding a relationship to make this more 'real-world' Changes to our Classes...
Page 4 of 7 (151 items) «23456»