//build/ 2012 Talk Video and Source Code

Posted on November 20, 2012. Filed under: Entity Framework, Visual Studio | Tags: , , , , , |

BuildSession

This year at the //build/ conference I presented a session titled ‘Building data centric applications for web, desktop and mobile using EF5’. In addition to EF5, I also covered the what and when of EF6 and did a quick demo of my favorite EF6 feature (custom code first conventions).

You can view the session recording, and download it in various formats, from the //build/ website.

 

The majority of the session was spent coding in Visual Studio. During the session I built a Park Finder application starting from File –> New Project.

ParkFinder

 

Source Code

I’ve published the source code for the Web and Desktop projects that I built during the session.

ParkFinder.Web

To use the Park Finder web page you will need to get your own Bing Maps key and enter it on line 10 of Views\Home\Index.cshtml.

I’ve added the following line to Global.asax so that the migrations will be automatically applied when you run the application. This means you don’t have to worry about running Update-Database to create the database schema before running the application, although you can if you want.

Database.SetInitializer(new MigrateDatabaseToLatestVersion<ParkFinderContext, Configuration>());

ParkFinder.Desktop

You will need to be using Windows 8 to use this solution (because it’s a Windows 8 application).

Make sure you have the Bing Maps SDK for Windows Store apps installed.

The ParkFinder.Web project must have been run so that the Park Finder Web API is running.

You will need to get your own Bing Maps key and enter it on:

  • Line 34 of MainPage.xaml
  • Line 57 of MainPage.xaml.cs
About these ads

Make a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

5 Responses to “//build/ 2012 Talk Video and Source Code”

RSS Feed for RoMiller.com Comments RSS Feed

Mr. Miller. I caught your presentation from the VS2012 Launch event and was intrigued. I really wanted to follow up later so I’ve gone to the links you suggest at the end of your presentation but all I really find are documentation about EF4.1. I’m sure I can learn a lot by starting here but I am a little confused by the lack of clearly marked EF5 tutorials etc. I’m going to give it a go anyway :)

Hi Doug,

http://msdn.com/data/ef is the main site for EF and all the articles, walkthroughs, etc. apply to EF5 (except the ones on the ‘Past Versions’ page of course). Any old blog posts etc. that relate to previous versions of EF have a big red header pointing you to the updated EF5 content.

~Rowan

Hi Rowan, please excuse me when I use this way to ask you a totaly different EF question, I can’t get an answer on stackoverflow and I need a solution for my problem:
I use EF against a SQL2012 contained database. I use database user in the DbContext connections string. The user ist dbo in the database. Everything is fine until I execute a “CREATE USER WITH PASSWORD” statement with EF. The statement is executed correct but the first SQL-Statement through EF after the CREATE USER Statement (e.g. Select * from Products) fails with the error:

2012-11-22 13:01:22.73 Logon Login failed for user ‘S-1-9-3-2668782908-1255352755-861440672-1088103753.’. Reason: Could not find a login matching the name provided. [CLIENT: 127.0.0.1]
2012-11-22 13:01:22.73 spid63 Error: 18056, Severity: 20, State: 5.
2012-11-22 13:01:22.73 spid63 The client was unable to reuse a session with SPID 63, which had been reset for connection pooling. The failure ID is 5. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message.

The same works fine with a handmade ADO.NET SQLConnection and SQLCommands.
It seens that DbContext looses it’s credentials after CREATE USER or EF “forgets” that the database is a contained database and therefore is no need for a SQLServer Login? Everything works fine when I use a db user with SQLServer login. But I want to use the contained database features.
Is this a known bug? Or do you have a tip or a workaround for me?
Thanks und Greetings
Martin

[...] data centric applications for web, desktop and mobile with Entity Framework 5. You can get the source code from the session on his [...]

Happy belated aniaversnry. I just found your blog. The picture of the gazebo in your wedding photo looks like my most favorite place. Where in Jamaica did you get married?


Where's The Comment Form?

    About

    Rowan works as a Program Manager for the ADO.NET Entity Framework team at Microsoft. He speaks at technical conferences and blogs at romiller.com. Rowan lives in Seattle, Washington with his wife Athalie. Prior to moving to the US he resided in the small state of Tasmania in Australia. Outside of technology Rowan's passions include snowboarding, mountain biking, horse riding, rock climbing and pretty much anything else that involves being active. The primary focus of his life, however, is to follow Jesus.

    RSS

    Subscribe Via RSS

    • Subscribe with Bloglines
    • Add your feed to Newsburst from CNET News.com
    • Subscribe in Google Reader
    • Add to My Yahoo!
    • Subscribe in NewsGator Online
    • The latest comments to all posts in RSS

    Meta

Liked it here?
Why not try sites on the blogroll...

Follow

Get every new post delivered to your Inbox.

Join 159 other followers

%d bloggers like this: