Adding my own objects to RolodexAdding my own objects to Rolodex
Old forum URL: forums.lhotka.net/forums/t/6133.aspx
James Thomas posted on Tuesday, January 13, 2009
I've read Expert C# 2008 Business Objects - good read! - and am now trying to learn by doing. I've taken the Rolodex example for Silverlight and am modifying code here and there to see how it works.
I've added some tables of my own to the database and some objects to accompany them to the BusinessClasses in Rolodex.Business.Server. BUT they don't seem to have 'joined' the project / solution properly (e.g. they don't appear in the list of shortcuts in the Rolodex.Business.Client project) and don't have debugging information created for them. What am I missing out?
When I try to use them, my code fails in CslaDataProvider.cs in Refresh() as this line doesn't manage to return a type:
Type objectType = Type.GetType(_objectType);
I don't think I can be far off getting this right, though am far enough away at the moment to be stuck! Thanks for any help, James.
sergeyb replied on Tuesday, January 13, 2009
You should add the classes to the .Server project, then link
them to client using Add Existing Item context menu, and selecting add as link.
Sergey Barskiy
Principal Consultant
office: 678.405.0687 |
mobile: 404.388.1899
Microsoft Worldwide Partner of the Year | Custom
Development Solutions, Technical Innovation
From: James Thomas
[mailto:cslanet@lhotka.net]
Sent: Tuesday, January 13, 2009 8:07 AM
To: Sergey Barskiy
Subject: [CSLA .NET] Adding my own objects to Rolodex
I've read Expert C# 2008 Business Objects - good read! - and
am now trying to learn by doing. I've taken the Rolodex example for Silverlight
and am modifying code here and there to see how it works.
I've added some tables of my own to the database and some objects to accompany
them to the BusinessClasses in Rolodex.Business.Server. BUT they don't seem to
have 'joined' the project / solution properly (e.g. they don't appear in the
list of shortcuts in the Rolodex.Business.Client project) and don't have
debugging information created for them. What am I missing out?
When I try to use them, my code fails in CslaDataProvider.cs in Refresh() as
this line doesn't manage to return a type:
Type objectType = Type.GetType(_objectType);
I don't think I can be far off getting this right, though am far enough away at
the moment to be stuck! Thanks for any help, James.
James Thomas replied on Tuesday, January 13, 2009
Thanks! That's got me to the next stage...
James Thomas replied on Tuesday, January 13, 2009
Ok... the next stage. I can create my objects and have them read data from my database - I have a working application.
One thing that's making development really difficult is that I can't debug the server objects. I can step through the silverlight code - the visual and the business objects running on the client - but I just get 'The breakpoint will not currently be hit' for the server code. I'm sure there's an easy solution. How do I debug the business objects running on the server?
Thanks for your help, James.
James Thomas replied on Tuesday, January 13, 2009
Ok, I've solved this one myself. Attach to process does the trick. What are good development practices then? Is there a way of hitting run and debugging client and server at once, or do you do one or the other? (Or have two instances of VS running?)
sergeyb replied on Tuesday, January 13, 2009
You can simplify the process by merging WCF host and SL Web host
into a single web site. Once both are running in the same process, you
can debug both sides.
Sergey Barskiy
Principal Consultant
office: 678.405.0687 |
mobile: 404.388.1899
Microsoft Worldwide Partner of the Year | Custom
Development Solutions, Technical Innovation
From: James Thomas
[mailto:cslanet@lhotka.net]
Sent: Tuesday, January 13, 2009 5:43 PM
To: Sergey Barskiy
Subject: Re: [CSLA .NET] RE: Adding my own objects to Rolodex
Ok, I've solved this one myself. Attach to process does the
trick. What are good development practices then? Is there a way of hitting run
and debugging client and server at once, or do you do one or the other? (Or
have two instances of VS running?)
James Thomas replied on Wednesday, January 14, 2009
Thanks for your help Sergey - debugging all in one instance of VS now.
Copyright (c) Marimer LLC