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
|
Suppose I have an association between two entities:
LightSpeed creates a back reference property on CrashReport back to Rider with return type of Rider. What if I want that property to return an interface instead? e.g. IRider |
|
|
If you set the code generation option for the property to be FieldOnly then you can implement the property in a partial class. e.g.
Remember the field will still specify a specific type so the incoming value on the setter will need to cast it back into that type.
|
|
|
Yeah in the end I decided against it as it wasn't a good solution. I'm having an "interesting" time figuring out how to shoe-horn a LightSpeed model into my code-first object model. There are a number of clever mechanisms i've implemented in my object model that cause untold problems integrating with LightSpeed. So I am taking the "container" approach to solve this (use the LightSpeed entity class inside my POCO. I've got another problem but I'll create a new thread. |
|