August 2007 - Posts

MSDN Events in Leeds (in association with Black Marble)

Just a bit of a "plug". The chaps from Black Marble are being kind enough to host MSDN events in Leeds and I'm going there on the 20th September with Martin to talk about .NET Framework V3.0 and .NET Framework V3.5. You can find details of Read More

SQLBits Community Event

The SQLBits Community Day Registration Site is now open for you to register to attend the event on the 6th October at Microsoft Campus down in Reading. You can also take a look at the sessions and vote for the 10 that you would most want to Read More

QuickLinks: System.AddIn and the Microsoft AddInFramework

System.AddIn in Framework V3.5 is about building hosts that load plug-in Add-Ins with functionality around discovery, isolation and lifetime management. It also tries to deal with the thorny problem of versioning one or both ends of the host<->addin Read More

ADO.NET Entity Framework - Bringing Together A Few Previous Posts

This is just a convenience - links to the posts that I've made so far around beta 2 of the ADO.NET Entity Framework. The Overview Video Entity Framework - Overview Video Note: This is also available on my Live SkyDrive in 5 pieces if that helps. "Getting Read More

Filed Under: , ,

Viewport2DVisual3D and Friends in WPF V3.5

I'm fairly poor at 3D. I was optimistic when WPF came along because I felt it might suddenly turn me into "3D guy" but it didn't (it was, perhaps, asking a lot :-)). I can just about sit down and produce a mesh that defines a plane or (once) I managed Read More

WCF V3.5 in Partial Trust

I tried to build a WPF XBAP that called a WCF service from its partially trusted environment using VS 2008 Beta 2 and managed to make it work but there's a bit in the docs that you need to read if you're playing with this stuff. I don't have an online Read More

Entity Framework - Object Services Level. CUD with Stored Procedures.

How would you get the Entity Framework to map inserts, updates, deletes through a stored procedure layer rather than dynamically asking the underlying provider to generate INSERT/UPDATE/DELETE statements? I was about to write some code when I came across Read More

Entity Framework - Entity Data Model Wizard and SQL CE

I was just trying to build a default EDM from the Northwind database with this wizard; and every time I got to the page above it simply exited (i.e. disappeared). I figured that I must have broken it but then I've been messing around with SQL Compact Read More

Outlook Connector for Live Mail

I've been missing the ability to use Outlook in order to send/receive Live Mail for quite a while. You used to be able to do that at one time and then I think the service changed so that you couldn't. Regardless, it's back and I'm really pleased to see Read More

Office Does ClickOnce

This is the first time I tried this since getting VS 2008 Beta 2 and I can't see many blog posts out there on it (i.e. I searched for help and didn't find any) so I thought I'd share. Using Beta 2, I began a new Office project - went for Excel as Excel Read More

WorkflowServiceHost in Beta 2 - Getting to the Workflow Runtime

In Beta 1 of Fx3.5, the WorkflowServiceHost had a simple property on it called Runtime that got you to the WorkflowRuntime. Easy :-) I was just trying to move some code from B1 to B2 and realised that this property had gone and, fortunately, found this Read More

Entity Framework - Object Services Level. Transactions.

How do transactions play with the Entity Framework? As a starting point, if I do something like; static void Main(string[] args) { using (NorthwindContext ctx = new NorthwindContext("Name=NorthwindEntities")) { foreach (Shippers Read More

Entity Framework - Object Services Level. Concurrency.

If we're going to be updating or deleting records in the database then we probably care about concurrency. What happens if we've got code like this;static void Main(string[] args) { using (NorthwindContext ctx = new NorthwindContext("Name=NorthwindEntities")) Read More

Entity Framework - Object Services Level. Deleting and ObjectStateManager.

Following the general theme of the last couple of posts (here and here), I thought I'd carry on and experiment with deleting. static void Main(string[] args) { using (NorthwindContext ctx = new NorthwindContext("Name=NorthwindEntities")) Read More

Filed Under: , ,

Entity Framework - Object Services Level. Updating and ObjectStateManager.

Following on from the previous post I wanted to apply a similar approach with updating data. If I go and grab the first Shippers record from my store; using (NorthwindContext ctx = new NorthwindContext("Name=NorthwindEntities")) { Read More

Filed Under: , ,

Entity Framework - Object Services Level. Inserting and ObjectStateManager.

I'll try and exercise that ObjectStateManager a little by inserting some data (and keeping it all very simple by just playing with the Shippers table). Starting with this; static void Main(string[] args) { using (NorthwindContext ctx = Read More

Filed Under: , ,

Entity Framework - Object Services Level. The ObjectStateManager.

When you look at an ObjectContext (or something derived from it) in the Entity Framework you'll spot that it has a property on it called ObjectStateManager which is of type ObjectStateManager. This type is vital to making object services work beyond just Read More

Entity Framework - Object Services Level. Executing Stored Procedures for Query - Multiple Resultsets

Following up on that previous post where I managed to execute a stored procedure and get an EntitySet of Customers back from Northwind, I figured that the next thing to try would be a stored procedure that returns multiple result-sets. However, I Read More

Entity Framework - Object Services Level. Executing Stored Procedures for Query.

I thought I'd write a simple stored procedure and add it to Northwind;create procedure dbo.GetCustomersByCountry ( @country nvarchar(30) ) as set nocount on select c.* from dbo.Customers as c where c.country = @country   And Read More

Filed Under: , ,

Entity Framework - Object Services Level. Deferred Loading.

The results of this query; using (ObjectContext ctx = new ObjectContext("Name=NorthwindEntities")) { ObjectQuery<Customers> query = ctx.CreateQuery<Customers>( "select value c from NorthwindContext.Customers as c"); Read More

Filed Under: , ,

Entity Framework - Object Services Level. Generated Code in (e.g.) Northwind.ObjectLayer.cs

When you use edmgen.exe with /mode:FullGeneration or /mode:EntityClassGeneration you get a file emitted with a bunch of generated code in it. In particular, that generated code contains a class derived from ObjectContext (such as NorthwindContext) and Read More

Filed Under: , ,

Entity Framework - Object Services Level. Querying with Custom .NET Types

In the previous post I said that when we are using ObjectQuery<T> we are actually querying the "O-Space" or object-space and that ability to query is being driven by metadata that describes how to turn the O-Space into the conceptual or C-Space Read More

Filed Under: , ,

Entity Framework - Object Services Level. Querying with ObjectQuery<T>

We can define a query as in; using (ObjectContext ctx = new ObjectContext("Name=NorthwindEntities")) { ObjectQuery<Customers> query = ctx.CreateQuery<Customers>( "select c from NorthwindContext.Customers as Read More

Filed Under: , ,

Entity Framework - Object Services Level. Querying with ObjectContext and ObjectQuery<T>

I've written a few bits and pieces about EntitySQL and how you can use that from the perspective of just crufting up an EntityCommand, setting the command text and then going ahead and executing it to get a IDataReader and then enumerating that. However, Read More

Filed Under: , ,

Entity Framework - Entity Provider Level. Entity SQL - Finishing Up for Now

Returning back to that list that I talked about in a previous post, we had ANYELEMENT,CREATEREF, DEREF, IS OF, KEY, MULTISET, NAVIGATE, OFTYPE, OVERLAPS, Projection (including here as I've not yet figured out what it is :-)), REF, ROW , SELECT (including Read More

Filed Under: , ,

Entity Framework - Entity Provider Level. Entity SQL - OVERLAPS and SET.

Returning back to that list that I talked about in a previous post, we had ANYELEMENT,CREATEREF, DEREF, IS OF, KEY, MULTISET, NAVIGATE, OFTYPE, OVERLAPS, Projection (including here as I've not yet figured out what it is :-)), REF, ROW , SELECT (including Read More

Filed Under: , ,

Entity Framework - Entity Provider Level. Entity SQL - IS OF, TREAT, OFTYPE

Returning back to that list that I talked about in a previous post, we had; ANYELEMENT,CREATEREF, DEREF, IS OF, KEY, MULTISET, NAVIGATE, OFTYPE, OVERLAPS, Projection (including here as I've not yet figured out what it is :-)), REF, ROW , SELECT (including Read More

Filed Under: , ,

Entity Framework - Tooling. Simple Inheritance in the Designer

Going back to that previous post about playing with the Shippers table, I thought I'd see how much easier it was to produce a little inheritance hierarchy in the designer. I started off by altering my Shippers table as before; alter table shippers Read More

Filed Under: , ,

Entity Framework - Entity Provider Level. First Experiment with Inheritance

In order to look at the next keywords that I wanted to look at (IS OF, OFTYPE, TREAT) I need to introduce some kind of inheritance. I modified my Shippers table in Northwind to try and model inheritance using the table-per-hierarchy model (it's not the Read More

Entity Framework - Entity Provider Level. Entity SQL - USING.

Returning back to that list that I talked about in a previous post, we had ANYELEMENT,CREATEREF, DEREF, IS OF, KEY, MULTISET, NAVIGATE, OFTYPE, OVERLAPS, Projection (including here as I've not yet figured out what it is :-)), REF, ROW , SELECT (including Read More

Filed Under: , ,

Entity Framework - Entity Provider Level. Entity SQL - NAVIGATE

Returning back to that list that I talked about in a previous post, we had ANYELEMENT,CREATEREF, DEREF, IS OF, KEY, MULTISET, NAVIGATE, OFTYPE, OVERLAPS, Projection (including here as I've not yet figured out what it is :-)), REF, ROW , SELECT (including Read More

Filed Under: , ,

Entity Framework - Entity Provider Level. Entity SQL - KEY.

Returning back to that list that I talked about in a previous post we had ANYELEMENT,CREATEREF, DEREF, IS OF, KEY, MULTISET, NAVIGATE, OFTYPE, OVERLAPS, Projection (including here as I've not yet figured out what it is :-)), REF, ROW , SELECT (including Read More

Entity Framework - Entity Provider Level. Entity SQL - ROW, MULTISET.

Returning back to that list that I talked about in a previous post, we had ANYELEMENT,CREATEREF, DEREF, IS OF, KEY, MULTISET, NAVIGATE, OFTYPE, OVERLAPS, Projection (including here as I've not yet figured out what it is :-)), REF, ROW , SELECT (including Read More

Filed Under: , ,

Entity Framework - Entity Provider Level. Entity SQL - REF, CREATEREF and DEREF.

Returning back to that list that I talked about in a previous post we had ANYELEMENT,CREATEREF, DEREF, IS OF, KEY, MULTISET, NAVIGATE, OFTYPE, OVERLAPS, Projection (including here as I've not yet figured out what it is :-)), REF, ROW , SELECT (including Read More

Filed Under: , ,

Entity Framework - Entity Provider Level. Entity SQL - ANYELEMENT

Returning back to that list that I talked about in a previous post, we had; ANYELEMENT,CREATEREF, DEREF, IS OF, KEY, MULTISET, NAVIGATE, OFTYPE, OVERLAPS, Projection (including here as I've not yet figured out what it is :-)), REF, ROW , SELECT (including Read More

Filed Under: , ,

Entity Framework - EntityProvider Level. Entity SQL Keywords, Operators and So On.

Following on from a previous post and looking at the reference for Entity SQL, there's a lot that's familiar. Quickly copying the keywords out of the help file there are unary and binary operators such as; - (Negative) - (Subtract) != (Not Read More

Filed Under: , ,

Entity Framework - Entity Provider Level. Simple Querying Application (eSQL PlayPen)

Wanting to play with eSQL a little made me want to find a generic way of executing a query and viewing the results so I knocked together a Windows Forms application that would do that. Note, this was only really the results of a few minutes of playing Read More

Filed Under: , ,

EntityFramework - EntityProvider Level. Where is EntityAdapter?

If you're poking through the Entity Framework at the level below objects where you just want to execute queries and get a resultset back then you might spot that, whilst you can find EntityConnection, EntityCommand, EntityDataReader I don't think you'll Read More

Entity Framework - Entity Provider Level. First Querying of Northwind Model.

Having managed to get to SSDL, CSDL and MSDL files for my Northwind database it's perhaps time to do something with them. Note that this is still just using the default 1:1 mapping that the toolset has given me. I took the three files that the edmgen.exe Read More

Filed Under: , ,

Entity Framework - Tooling. EDM Designer & SQL 2008.

A small word of warning - if you're playing with the Entity Framework and the designer support inside of Visual Studio 2008 Beta 2 then I think it's probably easier to install SQL 2005 rather than SQL 2008 because, from experience, you Read More

Entity Framework - Designer. Generating an EDMX file from Northwind in Visual Studio.

Similar to the previous post, there's a mechanism inside of Visual Studio for generating a model without having to drop out to the command line and use edmgen.exe to do it. Inside, of my VS project I can do "Add New Item" and select "ADO.NET Entity Model"; Read More

Entity Framework - Tooling. EdmGen.exe - Generating SSDL, CSDL, MSL from Northwind.

As a "Hello World" thing to do, I went ahead and built a new console application in Visual Studio 2008 and then added references to the Entity Framework (System.Data.Entity.dll from the GAC). I then went off to build myself a model, I didn't want to type Read More

Entity Framework - Metadata Files. MSL Schema

If you're keen to get a firm grasp on what the three "files" that drive the Entity Framework look like then you'll perhaps find no more definitive place than in the resources of the assembly; System.Data.Entity.dll if you open it up with Reflector then Read More

Entity Framework - Metadata Files. CSDL Schema

If you're keen to get a firm grasp on what the three "files" that drive the Entity Framework look like then you'll perhaps find no more definitive place than in the resources of the assembly; System.Data.Entity.dll if you open it up with Reflector then Read More

Entity Framework - Metadata Files. SSDL Schema.

If you're keen to get a firm grasp on what the three "files" that drive the Entity Framework look like then you'll perhaps find no more definitive place than in the resources of the assembly; System.Data.Entity.dll if you open it up with Reflector then Read More

Entity Framework - Installation. System.Data.Entity.dll

I installed the new version of the Entity Framework. The Framework looks to install a couple of assemblies - System.Data.Entity.dll and System.Data.Entity.Design.dll. System.Data.Entity.dll is the more interesting bit (to me :-)) as it looks to contain Read More

Entity Framework - Overview Video

With the release of new bits for the Entity Framework I thought I'd have a try at making a relatively short video providing an overview. The video is linked from the picture below; For those of you brave enough to give it a viewing I'd strongly Read More

Filed Under: , ,

ADO.NET Entity Framework Beta 2 &amp; August Tools CTP

I happened to be browsing the MSDN download centre and n