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
|
I know I just suggested something and you are working on it but I thought of another one for possible future release. My Original problem was with Data Properties that I wanted to handel special. One senario is for a property that if null will look at the parent object to return a property value of the parent. I have been manually creating the field and property in my partial class. But perhaps a better way would be to only define the field in the designer and set all its attributes. Then have a Flag telling the designer that the Property for the Field is defined externally so it wont code generate that Property. But it would still show in the designer as Existing but maybe greyed out as a reminder that it is externally defined. That way the designer database sync could verify that the Field for the Data Column is being generated. I dont know if a Property not defined for a non transient Field if that messes up the Magic you perform in determining data columns. But that is my suggestion anyway. I just dont like Syncing with the Database And having it tell me what is wrong with my Model when I know it is correct. To sum things up If I was unclear in my rambling. Add Properties in the Designer that generates the field with attributes but not the Property for accessing that Field. Clearing up sync issues. If only Microsoft had implemented Partial Properties in C# 3.0 maybe in 4.0?
|
|
|
Thanks for this suggestion. We've had another customer ask for something similar so we will see if we can fit it in somewhere. |
|
|
This will be in nightly builds beginning 12 Dec 2008. Properties now have a "Generation" property which can be set to Default (generate backing field and a property with getter and setter), FieldOnly (generate a backing field, but no property; it's up to the developer to implement the accessor property) or None (generate no code at all, it's entirely up to the developer to implement it). The database sync engine doesn't care about code generation, only about what's in the model. So it will treat non-generating properties the same as normal properties. That is, if you put a (non-transient) Foo property on an entity, the sync engine will expect to find a Foo column in the database (and will tell you that your model is up-to-date if it finds one), even if the designer is not generating C# code for Foo. Non-generation is currently available only for primitive properties; at the moment, the designer will continue to always generate fields and properties for the collection, backreference and backreference ID (and similarly for one-to-one associations and properties of value object type). If custom implementations of associations and value-type properties are important for your scenario then let us know and we will try to bring them forward. |
|
|
Wow you guys are fast. Thanks for your hard work
|
|