Updating Dates with WPF DatePicker

I spent hours and hours trying to find this piece of information. Finally I was very happy to have Julia Kornich, a technical writer on the EF team, save the day!

By default a DatePicker control does not notify it’s datasource of changes.

Even when you are doing a drag & drop application.

I had a DataGrid where every column but the date columns was pushing changes back to the database.

What was wrong with the DatePicker?

You need to explicitly tell it to do the job with the UpdateSourceTrigger attribute. It is not in the XAML by default. And in order for the notification to happen when the user changes the date, the UpdateSourceTrigger needs to be set to PropertyChanged.

<DatePicker
   SelectedDate="{Binding Path=OrderDate, Mode=TwoWay, 
                          ValidatesOnExceptions=true, 
                          NotifyOnValidationError=true, 
                          UpdateSourceTrigger=PropertyChanged}"

   DataContext="{Binding}"
/>

And there you have it!

Perspectives on Entity Framework at ONETUG Brown Bag Live Meeting

Thanks for attending the ONETUG Brown Bag meeting today where I did a quick look at various approaches to working with EF: database/model/code first, working with POCOs and legacy classes and talking about range of using EF in RAD apps to a more architected enterprise app.

You can find my PowerPoint (which I kept losing thanks to not bringing along my Live Meeting manager) at http://www.slideshare.net/JulieLerman/perspectives-on-ef. The slides are a little more of the zen presentation style… not much in the way of bullet points/details. If you are trying to get the meat of the presentation, it won’t be of much use. Sorry.

The application I showed at the end (MVC app with various projects for entities, model, repositories, testing, interfaces) is from Chapter 27 of my book, Programming Entity Framework 2nd Edition. You can find the sample code for that chapter (as well as others) on the downloads page of my book website.

If you watched the presentation, I had a strange problem when I was trying to modify the model to line a property name  up with my POCO class. The original name was “Name” and the new name was “RoomName”. There was an error indicating that the model still had “Name” which was not true.

The reason for this was because I was using a solution that I’ve used for a number of demos and it had a phantom DLL in the bin directory with a different version of the model, a version that was still using “Name” for that particular property. EF was most likely finding that embedded model first, hence it’s complaints. Once I deleted all of the bin files and rebuilt, things worked as expected. Cleaning the solution did *not* do the trick. I had to explicitly delete those files. These things only happen when you are presenting live and it’s being recorded for posterity. I have made my monthly sacrifice to the demo gods.

Entity Framework NYC Firestarter Slides and Demos

On Monday Sept 27th, Rachel Appel, Steve Bohlen and I presented a full day of Entity Framework presentations at the Entity Framework NYC Firestarter to help developers get started with EF.

The combined slides from our six sessions are on SlideShare.NET at Entity Framework NYC Firestarter (note that there is currently a gap as I await the slides from Session #3).

You can get the demos from my presentations on the downloads page of my book’s website, learnentityframework.com/downloads.

Here are direct links:

Be sure to check the readme.txt files in the downloads.

Watch our blogs, as well as Peter Laudati’s, for the “eventual consistency” scenario where you can find links to all 6 sessions and the slides in one place!

Presentations & Sample Code for my New England Code Camp Talks

I have posted the slides and demos for two of my three NECC14 talks that I did yesterday (Oct 2nd) on the downloads page of my book’s website at   http://learnentityframework.com/downloads/#conf

You’ll find the demos for Persistence Ignorant Entity Framework 4 and n-Tier ASP.NET Web Forms Apps with Entity Framework. Look in the conference section.

The slides are on SlideShare (www.slideshare.net/julielerman).

I did a third talk (Unit Testing for ‘Fraidy Cats Like Me” but it did not have a powerpoint and is not a talk that generated demos.

Vermont IT Job: Web Developer in Northern Vermont

Senior Web Developer

Northern VT eCommerce client is actively seeking a Senior Web Developer to join their team.

You will be working in conjunction with interdepartmental groups focusing on deployment and support of multiple eCommerce product lines.

eCommerce experience is essential to successfully utilize all current and future features enabling a strategic advantage to their company.

Our client operates in fast paced varied environment which requires excellent written and verbal communication skills.  Candidates are expected to be flexible and tolerant of timelines and deadlines.

Daily Responsibilities:

         Develop new applications as identified by company goals and manage through packaged and customized applications.

         Maintain and enhance existing web applications.

         Perform unit and systems testing for web applications.

         Design and implement user driven templates, databases and interfaces.

         Develop database driven user interfaces.

         Develop external web portals.

         Must be a team player who is able to work independently and meet deadlines.

Key Skills:

         7+ Yrs Web Development

         Solid working knowledge: C#, Asp.Net, XML, PHP and other Open Source technologies

         Solid working knowledge: Microsoft SQL Server, Oracle

         Bachelor’s Degree

         Desired: Flash, JQuery, eCommerce Server, Photoshop

Perm Role:  80-90K

 

Contact:

Kim Coffin
FIT Solutions, LLC
"Providing IT Resources that FIT Your Business"

413-214-2552 (cell)
413-363-0204 (fax)

kcoffin@fitsolutions.us
http://www.linkedin.com/in/kimcoffin
www.fitsolutions.us

Programming Entity Framework e-book for $9.99 one day only!

O’Reilly Media has placed the new edition of my book available  in their “Deal of the Day” program today. You can get the ebook version for only $9.99.

That’s TODAY only, though: Monday August 30, 2010.

Go to http://oreilly.com/catalog/9780596807269 and use the discount code DDPEF.

If you miss it today, you can get a 50% discount on the ebook from O’Reilly (not sure about a deadline) with the code MTKED. THat code is also good for a 40% discount on the print copy. However the MTKED discount code does not work everywhere. I’ve heard that people using the UK checkout are unable to use that.

If you want to get the book from Amazon, here is a direct link to Programming Entity Framework 2nd edition (for VS2010/EF4/.NET4)