Currently, 8 of the 10 videos on Code First and EF 4.1 I have already created for MSDN are online but they are not easy to find.
Three of them are on the msdn.com/data/videos page. The others have not been placed there yet although you can find links to the videos at msdn.com/data/ef and then from the videos to the articles.
Here are direct links to all of the videos and related articles that are currently online.
- Building an MVC 3 App with Code First and Entity Framework 4.1 Whitepaper Video
- Building an MVC 3 App with Model First and Entity Framework 4.1 Whitepaper Video
- Building an MVC 3 App with Database First and Entity Framework 4.1 Whitepaper Video
- Code First Data Annotation video article
- Code First Relationship Fluent API video article not online yet
- Code First Database Initializers video article not online yet
- Validation in Code First and DbContext: video article (note 4/15: MSDN’s EF page points to the annotations content, but I found the correct links π )
- Code First: Mapping Fluent API: video article not online yet
- DBContext Change Tracker API: video & article not online yet
- Code First and WCF Data Services: video & article not online yet
Samples?
I have provided C# and VB samples to go with each section. The samples are already online for the first three and are available from the pages with the articles, not the videos.
Monday May 2, 2011: There seems to be a problem with the videos on MSDN’s website. I have contacted MSDN. They are aware of the problem and trying to resolve it. Sorry. I just created the videos and have nothing to do with the hosting. π Will modify this blog post when the problem has been resolved. All better now! (8pm EST May 2)
Β Β Sign up for my newsletter so you don't miss my conference &Β Pluralsight course announcements!Β Β
Hi Julie,
Great tutorials. Will these videos be posted on PluralSight? thanks
thanks. No these were for MSDN. I’ll do longer more indepth ones for Pluralsight though!
Hi Julie – loved your EF videos on Pluralsight, and looking forward to the 4.1 PS "more indepth" videos.
I noticed dbcontext doesnt support calling sprocs for CRUD operations? Is there a workaround of some kind? I went looking for a OnInsert/Update/Delete etc, but didnt see any way to hook it.
Am I out of luck with dbcontext?
yes and no (out of luck). You can always get to the ObjectContext from the DbContext. In fact I have an idea for a blog post π
@Joe: Here’s the blog post for you! thedatafarm.com/…/accessing-objec
@Joe – wanted to point out two things: 1) there is no direct sproc support like the mappoings to override insert/update/delete when you call savechanges. what I didn’t realize is that dbContext does have some database methods via dbContext.Database. See Rene’s comment in the other referenced blog post
That is what I was afraid of -> no way with dbcontext like with ObjectContext savechanges to tell EF "when you want to insert/update/delete use this sproc". This is a bummer π
What Im trying to do is to use EF as my DAL, and then have DAL independent (read: no DB access code bloat) classes that can be used both on the server and in a client side silverlight app. This is what drove me to the code first EF stuff.
But I also need to have sproc usage for the purposes of auditing data changes to the entities in the DB (ie, the sprocs log data changes-> who, when, what etc).
I want cake and eat too π
Does this make sense? ->
I do a database first EF impl with ObjectContext for my DAL. I do a completely independent (ie, no EF code) set of classes for the rest of the application. And I have some simple converters between them (wont be much code, its just field copies).
Make sense, or am I overthinking this?
@joe…perfectly good. Ef simply as a DSL is a great way to leverage ef. Its flexible to fit in a lot if architectures…from drag n drop to something like yours.
Julie:
Regarding code first and data annotation: how do I define a property so that it maps back to a Text data type in the database?
Thanks. Great videos and great book.
Great list! I’ve been given a Pluralsight subscription as a user group leader perk, and I’m looking forward to checking out your videos.
Just viewed the Building an MVC 3 App with Database First and Entity Framework 4.1. How would I go about adding data annotation attributes (e.g. [Required]?) Or am I better off using EF code first and then mapping to my database?
Great work on the Database First, I’m new to EF and that video got me hooked!
Sorry I’ve been away. π
@mikeyrad: There’s a way to add annotations to a partial class but it’s so klugdy it’s called "ugly buddy classes". Examples here: msdn.microsoft.com/…/cc488527.aspx
@Bill: You can specify a db data type in the Column attribute. If you need to see how EF types map to DB types, check out this blog post: http://juliel.me/jNMbgo
@Camey and Simone: <grin>
Hi Julie, none of the videos seems to working. I tried in Chrome, IE9, and FF4. π Thanks!
@Richard
I’ve heard a few people having problems with the videos and then suddenly they were working again.
FWIW, I jsut spot checked a fw in chrome and ie9 and am also having problems. The silverlight loader spins at 0%, then goes away and leaves me with a static image but no controls to play/pause etc. Assuming it will resolve itself, just like it broke itself, but I did forward the info to one of the MSDN online folks. (who is hopefully sleeping as it’s Sunday 6:30am his time right now :))
the video for database first is not working. Also, Where Can I download the db as this is a db first approach.
@Linda, the db is in the sample downloads. The samples seem to be attached to the whitepaper not to the video. So go to the page for the db first article and you’ll see the downloads.
@Linda & @Richard,
MSDN is aware of the problem and working on a fix. Sorry for the trouble.
The server has been kicked and the videos can be viewed again. Enjoy!
Any idea when the "10.Code First and WCF Data Services" article will be online. I am particularly interested in how this will pan out.
@Ady…wish I knew. FWIW, it’s stupid simple. Just a quick 5 minute video so you can see that yes, they do work together. It’s not an architected app. Console app used to demo consuming the service. I’ll ask.
there’s a EF4.1 sample here: http://prodinner.codeplex.com
julie,
Do you remember that I asked you about silverlight and wcf ria. It turns out, wcf ria does not support
ef code first. Jeremy likness did a great tutorial on silverlight 3 and code firsthttp://forums.silverlight.net/forums/t/231467.aspx
It looks like code first will not be avaiable till silverlight 5…
Hi william, code first RTMd a few months ago! Maybe you mean the code first support for RIA Services? π
Dear julie,
You are right that is what I meant
The wcf ria team just released support for code first 4.1. Jeff handley jeffhandley.com/…/RIAServicesCode
I am overjoyed at this news, silverlight, mvvm, code first, microsoft prism at least in my opinion are the way to go when you are talking about n-tier, class libraries,resource dictionaries etc.
Dear Julie,
I hope i could download EF 4.1 Videos. Any way thank you for all your works.
Thank you Julie.
You do excellent work
Thanks, just a pity the videos aren’t downloadable.
Streaming sucks in the 3rd world. π
I’ve been watching EF 4.1 Videos, very helpful. I hope I could download EF 4.1 Videos.
thanks!
I’ve one question, Can I use EF with enterprise application or will it cause any performance issue as application data grow more and more?
How about linq-sql compare to EF 4.1?