New Posts New Posts RSS Feed: WinClient Video question/suggestion
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

WinClient Video question/suggestion

 Post Reply Post Reply
Author
BenHayat View Drop Down
Groupie
Groupie
Avatar

Joined: 06-Jan-2009
Location: Estero, FL USA
Posts: 86
Post Options Post Options   Quote BenHayat Quote  Post ReplyReply Direct Link To This Post Topic: WinClient Video question/suggestion
    Posted: 24-Mar-2009 at 4:52am
I went through all the videos in the WinClient section. I was particularly interested in the last section that dealt  with making changes to the database and EF Model and more importantly to Domain Model. As I went through the videos, I was waiting to see how are we going to deal with the changes in the Domain Model, i.e. adding/removing columns or tables and etc. and did not see any reference to Domain Model!

I really would like to see how that is addressed with DevForce product and also how we maintain the validations afer these changes!

Thanks!
Best Regards!
..Ben

WPF & Silverlight Insider
http://www.MicroIntelligence.Com
Back to Top
GregD View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 374
Post Options Post Options   Quote GregD Quote  Post ReplyReply Direct Link To This Post Posted: 26-Mar-2009 at 2:17pm
Yes, the video series on changing the database and the Entity Data Model was pure Entity Framework - not our business, really, but we figured our customers might struggle with it.

All of the DomainModel's information about what entities exist, what tables they map to, and so forth, is stored (only!) in the Entity Data Model file(s) itself (themselves). Therefore you can't add, remove, or change an (entity or property) / (table or column) in the EDM without that change becoming, automatically, part of the DomainModel's definition. Naturally the .NET code for the DomainModel must be regenerated after any such change, if it is to be in synch with the model encoded in the XML.

DevForce watches the Visual Studio IDE for changes to EDMs that are used in DomainModels, prompts you when you change and save one, and offers to regenerate the DomainModel code then and there.

Back to Top
BenHayat View Drop Down
Groupie
Groupie
Avatar

Joined: 06-Jan-2009
Location: Estero, FL USA
Posts: 86
Post Options Post Options   Quote BenHayat Quote  Post ReplyReply Direct Link To This Post Posted: 26-Mar-2009 at 2:57pm
Hi Greg;

I'm not sure if you offered a solution or just explained what happens during change process. So, let me ask it this way.

After the first time the DomainModel and partial classes are created, I go ahead and add a series of business rules/validations to my partial classes for a particular table (i.e. Emplyee). Then a few days later, I need to add a few new fields to my one of my Employee table. I add them to the employee table and then I have EF to update the EDM.

So, what's the next step for Devforce ORM mapper to recognize the new fields but at the same time I won't loose all the codes I've written as business rules to my parital class for that employee table?

Thanks!
Best Regards!
..Ben

WPF & Silverlight Insider
http://www.MicroIntelligence.Com
Back to Top
ting View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 27-Mar-2009
Location: San Francisco
Posts: 427
Post Options Post Options   Quote ting Quote  Post ReplyReply Direct Link To This Post Posted: 02-Apr-2009 at 4:51pm
Hi Ben,
 
When DevForce regenerates the business objects your partial classes will not be touched, so all your custom code is preserved.  After modifying the EDM, you should get a message to regenerate the domain model, after which all the new fields will be available to you.
 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down