This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
We've created some classes by hand and would like to have them added to the designer so we can push them to the database when we sync for the first time. Is there anyway we can get these classes onto the designer? We've tried a bunch of things, including editing the diagram and cs files of the designer, but it never recognizes the properties in the hand coded partial class. |
|
|
The designer doesn't know about partial or custom classes -- you could write arbitrary code in there so it wouldn't know what to do with them. What I would suggest is that you define the classes, properties and associations in the designer, but set their Generation properties to None so that the designer knows about them and can include them in database sync but doesn't emit code for them (and therefore doesn't interfere with your existing custom code). (Just to give you a bit of background on why editing the dependent files doesn't work: the .diagram file just contains the visual layout, things like positions and sizes of the entity shapes, and is not used during database sync or code generation, and the .cs file is generated from the .lsmodel whenever you save the .lsmodel, and this is a one-way operation.) By the way, please note we have a known bug with database sync at the moment where creating new tables is not reliable when the new tables have associations on them. We would therefore advise creating the designer entities, performing a database sync immediately to create the tables, and only then adding properties and associations (with Generation set to None) and updating the database. Apologies for any inconvenience. |
|