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 48 – How to host a Data Service in WCF

    Every wonder if you can host an Astoria Data Service in WCF? Well turns out the answer is yes, in fact once you’ve got your references set up etc it is pretty easy. Step 1 – Setting up your project Here is what my working project looks like: In this example I am using VS 2010 beta 2, but this should...
  • Blog Post: Tip 47 – How fix-up can make it hard to change relationships

    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.Add(product); } Ignore for a second that in...
  • 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...
Page 1 of 1 (4 items)