Entity framework editing data

Entity framework editing data

Old forum URL: forums.lhotka.net/forums/t/7621.aspx


andy posted on Monday, September 14, 2009

I just tried out Murach's book source code. All of the sample apps are using pop-up window to do data editing. Is it because E.F. objects do not play well with databinding on the main window green(i.e adding new record to child grid, etc...)?

RockfordLhotka replied on Monday, September 14, 2009

It is certainly true that EF objects don't implement most of the data binding interfaces. I think they only implement INotifyPropertyChanged, which is the bare minimum, and isn't enough for most datagrid controls to operate correctly.

andy replied on Monday, September 14, 2009

Rocky, Thank you for your confirmation.
I just being spoiled by your csla framework and do not expect anything less from out-of-the-box databinding object for a framework.
Just wonder what is the adopting rate for E.F.
Does it live up to developer's expectation?

Andy

sergeyb replied on Monday, September 14, 2009

I have been using it with CSLA for a couple of months. It is a good product, although you can tell that it is version 1 product. Some of the most painful issues (such as IDs for foreign keys) are addressed in v2 (.NET 4.0).

Sergey Barskiy
Principal Consultant
office: 678.405.0687 | mobile: 404.388.1899

Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

-----Original Message-----
From: andy [mailto:cslanet@lhotka.net]
Sent: Monday, September 14, 2009 2:02 PM
To: Sergey Barskiy
Subject: Re: [CSLA .NET] Entity framework editing data

Rocky, Thank you for your confirmation.
I just being spoiled by your csla framework and do not expect anything less from out-of-the-box databinding object for a framework.
Just wonder what is the adopting rate for E.F.
Does it live up to developer's expectation?

Andy

andy replied on Monday, September 14, 2009

Sergey,
I am sure you can use in conjunction with CSLA for your DL. Any ADO.NET related for that matter. I just want to use E.F for 2 tiers simple app. Not sure I want to do so without rich databinding support.

Andy

sergeyb replied on Monday, September 14, 2009

You can data bind an app to EF classes because they implement INotifyPropertyChange. You will have to use partial classes probably for validation support since there is no validation in EF itself. You would also rely on exceptions being thrown from property setters so that your UI (WPF/SL) can listen to those to provide visual feedback to the user. For a quick and dirty app I'd say feel free to use EF by itself. For a robust app not a good idea IMHO.

Sergey Barskiy
Principal Consultant
office: 678.405.0687 | mobile: 404.388.1899

Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation


-----Original Message-----
From: andy [mailto:cslanet@lhotka.net]
Sent: Monday, September 14, 2009 3:58 PM
To: Sergey Barskiy
Subject: Re: [CSLA .NET] RE: Entity framework editing data

Sergey,
I am sure you can use in conjunction with CSLA for your DL. Any ADO.NET related for that matter. I just want to use E.F for 2 tiers simple app. Not sure I want to do so without rich databinding support.

Andy

RockfordLhotka replied on Monday, September 14, 2009

This is why I'm not terribly worried about EF "competing" with CSLA .NET -
they just don't do the things CSLA does. Nor does CSLA do the things they
do.

Rocky

-----Original Message-----
From: andy [mailto:cslanet@lhotka.net]
Sent: Monday, September 14, 2009 2:58 PM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] RE: Entity framework editing data

Sergey,
I am sure you can use in conjunction with CSLA for your DL. Any ADO.NET
related for that matter. I just want to use E.F for 2 tiers simple app.
Not sure I want to do so without rich databinding support.

Andy

Copyright (c) Marimer LLC