Browse by Tags

Tagged Content List
  • Blog Post: Tip 51 – How to load EF metadata from arbitrary streams

    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 and you don’t even have access to the local file...
  • Blog Post: Tip 45 – How to swap EF metadata at runtime.

    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="metadata=res://*/Blogging.csdl|res://*/Blogging...
  • Blog Post: The problem with Function Signatures

    So I was reading Stefan Tilkov’s latest post, about link and self . Good stuff. Now the bit that prompted this post was his discussion of the possibility of having different representations of the same thing. For example you could easily get three representations of the same Customer: With their Address...
  • Blog Post: Composable Services

    Dru Sellers just used a term I haven’t heard before, Composable Services . For me it the very timely term, because it succinctly describes a whole lot of Astronaut Architect dreaming I’ve been doing for the last 2 years. I recently started twittering as adjames *, and I’ve noticed, the stream of consciousness...
  • Blog Post: EDM misconceptions

    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 my word for it that X is super important, for...
  • Blog Post: Symbols Models and Inhibitory Control

    One of the things I find fascinating about US TV is the educational channels etc. Every now and then I stumble across something which sucks me in for a couple of hours. On Monday (I was sick... better now though, thanks for asking) I started watching something about childhood development. The topic...
  • Blog Post: Rolling your own SQL Update on top of the Entity Framework - Part 4

    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... We now have to build the UPDATE [Table] SET Column...
  • Blog Post: Rolling your own SQL Update on-top of the Entity Framework - Part 3

    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, I have no excuse, I will simply make an appeal to...
  • Blog Post: Rolling your own SQL Update on top of the Entity Framework - Part 2

    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 to look like: public static int Update<T>...
  • Blog Post: ObjectQuery<T>.ToTraceString() and possibilities...

    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 be the TSQL. This is very handy because it means...
  • Blog Post: Hydrating a DataTable from an EntityDataReader - Part 2

    See yesterday's post for some context... So we can't rely on EntityDataReader . GetSchemaTable() and a DataAdapter to do the filling of our DataTable for us. We have to do it ourselves. As with any problem the first step is to define the steps: Get a DataTable with a shape that matches the...
  • Blog Post: Hydrating a DataTable from an EntityDataReader - part 1

    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 code: MetadataWorkspace workspace = conn.GetMetadataWorkspace...
  • Blog Post: EntityConnectionStringBuilder

    In my last Metadata post I suggested using a string template to create an EntityConnection connection string. Well it turns out there is a better way... Enter the EntityConnectionStringBuilder class. The only thing it is missing is the ability to specify the location of each of the metadata files...
  • Blog Post: Using a random model at runtime

    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 like this: using ( EntityConnection conn...
  • Blog Post: Metadata, Objects and Values

    One of the things I am doing at the moment is writing a bunch of Entity Framework code with one common theme, leveraging metadata. In the spirit of transparency here is what I have learnt (just this, nothing else at all...) When working with the entity framework from the developer perspective there...
  • Blog Post: Introductions

    Seeing as this is my first post on this blog, a few things about me are in order. My name is Alex James, a new Microsoft employee, based in Redmond. My family and I have moved to Seattle from NZ just so I could take this job. Now NZ is a pretty nice place, so as you can imagine I hold high hopes for...
Page 1 of 1 (16 items)