Monthly Archives: March 2013

Video Pick from Getting Started with Entity Framework 5 Course

Here is a 6 minute preview from my new Pluralsight course, Getting Started with Entity Framework 5.

 

The course is about 4.5 hours long and I’ve written a small “guide” to it in this blog post: Getting Started with EF5 – New Course on Pluralsight so that you can decide if the course is for you or not. But I think it’s for everyone!! 🙂

Or you can go right to the course here: http://pluralsight.com/training/Courses/TableOfContents/entity-framework5-getting-started

Or you can watch one of my 9 other Entity Framework courses on Pluralsight! 🙂 http://pluralsight.com/training/Authors/Details/julie-lerman

I’ve still got a short stack of 30 day trial cards for Pluralsight if you need one but you have to promise to use it to watch my courses! 🙂 (And any of the other awesome courses you can find there as well.) Send a message to me through my contact form and I can shoot you the code.

Entity Framework at Boston Code Camp #19

I had the pleasure of going to Cambridge this weekend along with a car load of Vermonters (myself, Rachel Reese, Dennis Doire and Kyle Mitofksy) to participate in Boston Code Camp at Microsoft’s NERD Center.

We left just as Boston was getting pummeled with snow and a prediction of 10-14”. We saw nary a flake on the drive down.

Rachel gave two F# presentations. Dennis gave a session on Specflow and Selenium. I did two talks on ..guess what? Yep Entity Framework.

 

Session #1 Entity Framework in the Enterprise

The first talk was Entity Framework in the Enterprise. It was a very compressed version of my 3+ hour course of the same name on Pluralsight: Entity Framework in the Enterprise.

You can find the slides for this session on Slideshare at http://www.slideshare.net/JulieLerman/lerman-ef-in-the-enterprise-bocc13.

I spent quite a lot of time preparing and testing the 6 solutions that I showed in the session. Afterwards a friend noted that I had never actually run any of the apps or test whose code I had spent most of my time exploring. That made me laugh because I had worked hard to ensure that every app ran correctly and every test passed. So to remedy that, I have created a short video on YouTube where you can actually see the tests run (and pass) and the one of the apps running. Here’s that video: Lerman EF in the Enterprise Run Tests BOSCC13 (there’s no sound and it’s about 4.5 minutes).

Session #2: EF FTQs (or Entity Framework, Frequently Tweeted Questions)

I have also put up the slides for the second session on Slideshare at http://www.slideshare.net/JulieLerman/julie-lerman-entity-framework-ftqs-frequently-tweeted-questions. Something strange happened during the demos. I wanted to show attendees the reverse engineering feature of the EF Power Tools. I pointed to a database and nothing happened…no classes were created. I’ve never seen that happen before. I didn’t see an error message on the bottom of the screen. I tried it again with the same results, so instead of doing what I wanted to which was get to the bottom of the problem, I knew it was better to just move on. I spent some time this morning trying to duplicate the problem and never could. So who knows what happened. So for those of you who haven’t seen this feature before, I recorded a little video (again, no sound and it’s only 78 seconds) so that you can see it in action. That’s here: Lerman Reverse Engineer Database for Code First

 

It was a great code camp! Congrats to all of the folks who made it happen: speakers, attendees, sponsors and organizers/volunteers…especially to Patrick Hynds, Bob Goodearl and John Zablocki and Chris Pels.

bostoncodecamp.com

Getting Started with EF5 – New Course on Pluralsight

While EF5 did not bring a huge amount of change to Entity Framework, one small change in the EF Designer in Visual Studio 2012 made a huge difference for people getting started with Entity Framework. The designer now uses a code generator that spits out POCO entity classes managed by a DbContext by default rather than the EntityObject based classes managed by the ObjectCpntext as it did for VS2008 and VS2010. It’s a VERY good change but because almost all of the training materials out there for EF newbies is based on VS2010, it is pretty confusing to get started with EF5 and VS2012.

The advanced materials are still completely valid.

While this is driving me a little crazy with respect to the 2nd edition of Programming Entity Framework – a huge undertaking to update, I was able to fix the problem by creating a brand new course on Pluralsight.

It’s just been released today and is called “Getting Started with Entity Framework 5”.

It’s got 6 modules.

Entity Framework 5: Planning Ahead

This is a good overview for newbies but also highlights “what’s new” which will be really helpful for people coming from EF4 or even EF4.1, 4.2 or 4.3.

Database First Modeling

Like using the designer and starting with an existing database? Database First is for you. Also, there are plenty of new designer features so if you’re experienced with EF but moving to VS2012, you’ll want to learn about the new features (including creating enums from database fields and supporting geography data types).

Model First Modeling

Like the designer but no database yet? You may prefer to go this route of designing your model in the designer and letting the designer generate database schema for you. While I touch on some of the new designer features in this module, I don’t pay as much attention to them as I do in the DB First module because it would just be much too repetitive. But you will also see here how to define enums and geography data that will properly map the database schema that the designer creates.

For both model first and database first, you can learn more about customizing your model in the course Designer Supported EDM Customization.

Code First Modeling

If this is you: “eew designers stink” then you probably want to just use code to define your model. This gives highlights of Code FIrst along with the new enums & spatial data support. You can then continue your education in the EF 4.1 Code First course and the Code First Migrations course.

Interacting with your Data Model

Whether you’ve created your model with Database First, Model First or Code First, using the model is almost always the same. (“Almost” because code first does not yet support mapping to stored procedures so that’s the only real difference.) This module uses a simple console application to get you going with the basics of querying and updating your database using the DbContext. Once you’ve got an understanding of these basics, the dedicated DbContext, Querying and Validation courses that I’ve created in the past few years will get you the in-depth info you need for more advanced work.

Using EF in Your Solutions

I didn’t want to leave you with the impression that what you saw in the previous module is as far as EF can go. This last module introduces you to some good architectural practices and then I use EF (along with these basic architecture patterns) in a client side application (WPF), a web app (MVC) and a data service so you can see how the pieces fit together. I have a much more advanced course called “Entity Framework in the Enterprise” that you can watch after this. That course was created using Visual Studio 2010 and Code First and the DbContext and everything in there will be applicable to EF5.

Enjoy!

http://pluralsight.com/training/Courses/TableOfContents/entity-framework5-getting-started