Category Archives: Data Access

Teaching Entity Framework at Stockholm Developer’s Summit in April

I am very excited about this!!

I will be presenting 2 sessions and a full-day workshop at the Developer Summit 2008 in Stockholm April 9-11.

The workshop is “Entity Framework 0-60”  and the sessions are Entity Framework in the Enterprise and Silverlight Annotation.

Patrik Lowendahl, one of the organizers, tells me that Stockholm is really lovely in the Spring!

It also means I get to see my buddy Christian Weyer and meet Tess Ferrandez (the ASP.NET goddess at Microsoft Support), Jimmy Nillson and a bunch of people I’ve heard about for a long time and not had the chance to meet.

In case you can’t get to Sweden, I”ll be doing the full-day workshop at DevConnections in Orlando in late April.

LINQ – Learn by example

Roger Jennings writes about issues with finding examples of complex LINQ to XML queries. Boy have I been there and done that. One of the problems with learning LINQ is that you have two options

1) learn LINQ very deeply so you can do what you need

or

2) learn by example

With LINQ, I tend to start with a need, do what I can until I hit a wall, then look for examples that will help me and use them to learn even more. But it means that there needs to be a LOT of examples.

I have often likened learning LINQ as well as learning Entity SQL to learning T-SQL. Learning T-SQL has, for me, been an evolution which has occurred over some ten years. I still have to look up the Cast & Convert topic 99% of the time in the docs whenever I need to convert a datetime to a desired char format.

Even if there were 1001 examples, I know that there will always be something I want to do that I can’t find an example for and will have to rely on gaining a better understanding of LINQ in order to accomplish it.

EF Mapping to Read Stored Procs, another twist

Entity Framework easily supports mapping to read stored procedures when the query results match up with an existing entity in the model. If your query results don’t, then you have to create a new read only entity and entity set in the CSDL and a new “fake table” entity and entity set in the SSDL and then you can do the mappings. (I show how to do that in this blog post.)

Chris Snyder found a new twist. What if the result matches an entity, but some of the fields inthe result have been renamed? Unless you wanted to create a read only entity to match it. But then you won’t get the change tracking benefits of a entity with a key.

Microsoft hires another Entity Framework/Astoria nut

Jonathan Carter was very interested in Entity Framework and Astoria. Last month, he started working for Microsoft as an Technical Evangelist. So he gets paid to share his excitement about these and other .NET technologies.

Guy Burstein was very interested in Entity Framewrok and Astoria writing lots of posts about the two topics. Today Guy announced that he has started working for Microsoft Israel with the Developer & Platform and Adoption team. He too says he has found the sweet spot of getting paid to do something that you are good at and love.

Congrats!!

Links for keeping an eye on database providers’ Entity Framework status

I’ve been snooping around the web and found links for many of the db vendors (and 3rd party vendors) to try to watch their own news about what they are doing for Entity Framework.

Here’s Dave Sceppa’s list of companies working on EF providers and interleaved with his list are my best stabs at a blog or page on their website to watch:

Providers Targeting Publicly Available Versions Within Three Months of RTM

·         Core Lab – Providing connectivity to Oracle, MySQL, PostgreSQL and SQLite databases

Core Lab does not seem to have a blog but here is their News page

·         IBM – Providing connectivity to both IBM DB2 data server and Informix Dynamic Server (IDS) databases

Took some digging, but here’s the guy responsible for letting non-IBM developers use IBM’s databases: Grant Hutchinson’s blog.

·         MySQL AB – Providing connectivity to MySQL databases

MySQL is opensource. The best resource I think to watch is Planet MySQL, which is an aggregated feed of various MySQL bloggers.

·         Npgsql – Providing connectivity to PostgreSQL database versions 7.3+ and 8.x

Npgsql stands for .NET Provider for PostgreSQL. Opensource. Here’s the project page for the .NET projects. Also, they were very excited about their Entity Framework provider getting in the news!

·         OpenLink Software – Providing connectivity to Oracle, Informix, Ingres, Sybase, MySQL, PostgreSQL, DB2, Progress and Microsoft SQL Server databases, and any data source accessible via OpenLink ODBC or JDBC bridge drivers

OpenLink doesn’t seem to have a blog either. Here is their launch page for info on ADO.NET providers that they write.

·         Phoenix Software International – Providing connectivity to SQLite databases

hmmmm??? I found Phoenix Software International, but nothing seemingly related here…

·         Sybase – Providing connectivity to SQL Anywhere databases

Here’s the SQLAnywhere launch page

·         VistaDB Software – Providing connectivity to VistaDB databases

VistaDB blog

* – The providers in the list above are also working towards publicly available versions of their providers to work with Beta 3 of the Entity Framework.

Providers Targeting Publicly Available Versions in 2008

·         DataDirect Technologies – Providing connectivity to multiple data stores including Oracle, Sybase, Microsoft SQL Server and DB2 via DataDirect Connect® for ADO.NET

None other than Jonathan Bruce! 🙂

·         Firebird – Providing connectivity to Firebird databases

Firebird is open source. HEre is the Firebird Community News website.

And, missing from Dave’s list is Oracle.

I’m watching Christopher Shay’s blog for any news.

Some great Entity Framework Guidance about Performance in client applications

I have spent a lot of time thinking about Entity Framework in web applications and in SOA and worrying about performance, serialization and concurrency.

But I haven’t spent a lot of time worrying about these things with respect to client apps (winforms and WPF).

In a great thread started by Nick in the forums where he was asking about keeping huge lists around in an application without having to hit the db over and over, both Danny Simmons and I assumed he was talking about web apps and started down the whole serialization/caching path.

But it turned out that Nick was worried about a WPF app which changes everything when you are thinking about performance.

In the end, Danny gave this great guidance (with my highlight):

“The context is safe to keep around as long as you are careful to make sure that it is always used only on a single thread (put it into thread local storage and have one copy for each thread if you need multiple threads).  The connection will open and close automatically as needed so you don’t need to worry about holding a connection open.  Long-running contexts are the expected pattern for rich client appsjust not the right plan for asp.net scenarios and the like where you want the server to be as stateless as possible.”

Mike Taulty adds his own take on Getting Started with ADO.NET Data Services

I wrote a series of Astoria posts based on the preview and have been thinking about updating them for ADO.NET Data Services, but it seems that it would be pretty redundant considering that we have three great resources already doing the same:

Mike Taulty has two posts now in a series: ADO.NET Data Services – Getting Started (2)

Guy Burstein is writing a series:ADO.Net Data Services Part 2 – Using Service Operations with WebGet

Jonathan Carter is writing series: ADO.NET Data Services Part 1: Services

Thanks guys. That means I can go do something else…