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 had difficulty getting the MVC stack to work with a simple LightSpeed model. I think the problem was that I was trying to bind to a class which inherited from an abstract class (using concrete inheritance). I have fixed it by altering the MVC stack source code... In ModelHelper.cs . GetValueModelsForEntity(Entity instance) I replaced these two lines: if (entityType.BaseType == typeof(Entity)) entityType = entityType.BaseType; with these: do I don't have a lot of experience with LightSpeed, MVC or Reflection so I may have missed something obvious, in which case please let me know so I can improve it further. If it all looks okay then please put the change into the SVN repo. Thanks, Chris |
|
|
Thanks for the tip, I was pulling my hair out trying to understand what was going on here. |
|
|
I guess just cause I hate "do" loops, I did it slightly differently: var entityType = instance.GetType().BaseType;while (entityType != typeof(Entity) && entityType.BaseType != null){ entityType = entityType.BaseType; } |
|