Mike Taulty's Blog
Bits and Bytes from Microsoft UK

Entity Framework - Mike Taulty's Blog

Blogs

Mike Taulty's Blog

Elsewhere

  • Added (Updated) ADO.NET Data Services Videos to C9

    I produced a new set of short videos around ADO.NET Data Services and dropped them on to Channel 9. You can find them here; http://channel9.msdn.com/tags/UK and that list will grow as time goes in ( specifically, it'll grow if I can get the publishing system to publish my next 4 videos for me as it's not playing ball at the time of writing :-) ).
  • On Entity Framework, Concurrency

    This is similar but not at all identical to this post about LINQ to SQL because it's using a different framework and that has different capabilities. Someone mailed and asked how we can detect concurrency problems with Entity Framework in order to ensure that when we submit changes to the DB we first; Present the user with a list of all the concurrency errors in one go Present the user with their changes versus the DB's current data Ask the user how to go about resolving each issue Repeat until all the changes get to the DB one way or another I can use the same tables and scripts and so on that I used in the previous post about LINQ to SQL. So...if I've got this table in my DB; create table Person ( id int identity primary key , firstName nvarchar(30), lastName nvarchar(30), timestamp ) with data; insert person(firstname,lastname) values ( 'first1' , 'last1' ) insert person(firstname,lastname) values ( 'first2' , 'last2' ) insert person(firstname,lastname) values ( 'first3' , 'last3' ) and I bring this into an...
  • Entity Framework - Timestamps and Concurrency

    Someone asked me today how you'd go about ensuring that timestamp columns in your database tables show up in your Entity Framework EDMX file with a Concurrency=Fixed attribute on them. That is - it's very likely that the timestamps are there on the table to enforce concurrency so why not default their Concurrency value to "Fixed" ? It's a good question but it's not something that the tooling does as far as I'm aware so I tried to have together some LINQ to XML code that would make an attempt at it. I don't claim that this is correct at all but it might be a starting point for this and similar, related pre-processing that you want to do on an EDMX file. static void Main( string [] args) { XElement edmxFile = XElement.Load(args[0]); XNamespace edmxNs = XNamespace.Get( "http://schemas.microsoft.com/ado/2007/06/edmx" ); XNamespace ssdlNs = XNamespace.Get( "http://schemas.microsoft.com/ado/2006/04/edm/ssdl" ); XNamespace mapNs = XNamespace.Get( "urn:schemas-microsoft-com:windows:storage:mapping:CS" ); XNamespace csdlNs...
  • Entity Framework Talk at Oracle .NET SIG

    Thanks a lot to the people who came along to my Entity Framework talk at the Oracle and .NET Special Interest Group in London today. As promised, I've uploaded the slides in PPTX and PDF format if you need them for anything.
  • Entity Framework Talk at VBUG Bristol

    Thanks to the people who came along to my talk on Entity Framework at VBUG in Bristol yesterday. I promised that I'd make the slides available and they can be found here for download in PPTX format and PDF format . This was more or less the same talk as I delivered at Southampton the week before so these resources are also relevant.
  • Entity Framework Talk at NxtGen Southampton

    Thanks a lot to the guys that run NxtGen Southampton and the attendees who came along to my talk on the ADO.NET Entity Framework this evening . I really enjoyed it and hope that you enjoyed it too if you came along - the venue was really interesting ( in what felt like a connecting space between two buildings that are part of a Church ) and thanks a lot to John and Rich who put a lot of effort into getting together a great AV setup and did some sterling work around giving away the essential "swag" :-) If you're around the Southampton area doing .NET development then you should definitely get along to this group. Follow up resources from my talk; http://www.datadeveloper.net ( has a handy set of links including the "Get Entity Framework Beta 3" link ) http://blogs.msdn.com/adonet ( the ADO.NET blog ) http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2007/08/29/9691.aspx ( Some links from me about Entity Framework ( some are Beta 2 so beware of that ) ) Once again, thanks to NxtGen for inviting...
  • Entity Framework - Serializing Graphs of Entities

    Julie points to Danny and Danny points to the next CTP of Entity Framework - if you're interested in serializing the entities that Entity Framework returns back to you then you'll be interested in this; http://www.thedatafarm.com/blog/2008/03/28/HallelujahEntityGraphsWillBeXMLSerializable.aspx
  • DevWeek Talk - Understanding ADO.NET Entity Framework

    I did a talk down at DevWeek this afternoon about ADO.NET Entity Framework. Whilst it was a small room, it was full and I had a great time - hopefully if you attended then you enjoyed it too and got something useful out of it. Thanks for all the questions :-) As promised, the slide-deck is available in PPTX , PPT and PDF formats although it's not a huge slide-deck as I spent a lot more time demonstrating things. It's tricky to publish some of the demo bits that I used because I have a slightly tweaked northwind database so some of what I have probably won't work for you. I will re-publish the simple querying app that I use to demo Entity SQL as that might be something you could find useful.
  • ADO.NET Data Services - Identity columns and id values on the client

    Someone asked me about this so I thought I'd share here. The question was around how you can work with database generated values and have them returned to the client after the insert. My experiment ran like this. I created a table; create table test ( id int identity primary key not null , someColumn nvarchar(30) not null ) I created a website project, added an entity model which only has the table above in it and then added an ADO.NET Data Service and exposed my entity model through it in the standard way. I then used webdatagen.exe in order to read the metadata and build client proxy code. I then used that proxy class (called demoEntities below) to write a client; demoEntities entities = new demoEntities( "http://localhost:32768/WebSite1/ServiceOne.svc" ); entities.MergeOption = MergeOption.OverwriteChanges; test newTestRecord = new test() { someColumn = "foo" }; entities.AddObject( "test" , newTestRecord); entities.SaveChanges(); Console.WriteLine( "New id is {0}" , newTestRecord.id); and that all seemed to...
  • ADO.NET Entity Framework - QueryViews, Inline Functions in SSDL

    I have a mail from Tim on the EF team that I've had for a little while. I'd asked a question about mapping and he'd given me an answer saying something like "Oh, you could always do X, Y, Z" and I'd left this mail in my inbox for a while because I've been distracted and also because I didn't really understand how to do X, Y and Z but I didn't really want to say :-) Today, I think I understood a bit more of it and the result is twofold. The first of those folds is that I'm thinking that I'd really like to spend maybe a week in a darkened room doing nothing but Entity Framework but I doubt that I'll get the chance as (strangely) in my job I'm not really encouraged to learn technology but that's another story and not one that I'll bore you with here. The second of those folds is that I really think that the Entity Framework still has a whole lot of documentation and explanation that's going to be needed if people are really going to get it - there's a lot in there and it's not immediately obvious how to use it and...
  • ADO.NET Data Services - Screecasts

    I made a few more videos; ADO.NET Data Services - Querying with LINQ ADO.NET Data Services - Query Interceptors ADO.NET Data Services - Service Operations to go with these videos . Note, there are some "technical difficulties" at the moment in getting some of those videos to play in the Silverlight player. It's nothing to do with Silverlight AFAIK and I suspect it's everything to do with not being able to get to the MMS stream. Regardless, if you hit a glitch then press F5 and it should work in the end or just go for the "Full Screen" button which actually means "View in Windows Media Player" rather than "Full Screen" :-S
  • Entity Framework Links (and one other)

    Entity Framework Toolkits & Extras How Does The Entity Designer Generate Code? How To Extract CSDL from EDMX Oh...and I also encountered this; http://www.fishticuffs.co.uk/ Which Mike used to slap me around the face with a big fish - try it :-)
  • ADO.NET Data Services - Screencasts

    I made a few videos about Data Services. I have plans to make a few more as well but (as always :-)) I've got distracted by something else so, for the meantime; ADO.NET Data Services - Surfacing Data ADO.NET Data Services - Querying with URI's ADO.NET Data Services - A Basic .NET Client ADO.NET Data Services - A Basic AJAX Client ADO.NET Data Services - A Basic Silverlight Client I particularly enjoyed the Silverlight one which I stayed up into the small hours of the morning making. Why? Because of how closely it lines up with what you do in a full .NET application. Once Silverlight grows some controls and databinding in version 2.0 I really see Silverlight+Data Services as being a killer combination.
  • ADO.NET Data Services - Silverlight Add-On

    Just a quick link to make this easier to find; ADO.NET Data Services Silverlight Add-On
1 2 3 4 Next >