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 am getting an error when I attempting to build controller with MS VS 2013. Error There was an error running the selected code generator: 'Unable to retrive metadata for 'DataAccessLayerNS.Car'. One or more validation errors were detected during model generation: RestServiceNS.Models.ValidationError: : Entity Type 'ValidationError' has no key defined. Define the key for this Entity Type... There is no ValidationError entity. Any idea what this is referring to? |
|
|
Thats actually an EF generated error so Im assuming the generated code makes use of EF but has supplied your model type to it which is leading to the error you are seeing. Make sure you strip out any EF related code from the generated class and update it to make use of LightSpeed as required. You might want to consider using the LightSpeedControllerBase
|
|
|
The model I am using was generated by lightspeed. I haven't made any modifications to it. I was just wondering if I was missing a convenient way of quickly creating a starting point for a controller. Yes, I have seen that documentation for building ASPNET MVC applications. Right now I am trying to keep the REST services separate from the lightspeed implementation, so I have it in a separate class. This is all still very new to me. Are there any major drawbacks to this implementation choice? |
|
|
We dont add any templates or helpers for creating a controller so you can either use the inbuilt templates with MVC as a starting point and modify them from there to fit or just add a new class and then base it off either Controller, your own base controller class or the LightSpeedControllerBase If you are meaning keeping your model and service code seperate then there wont be any particular drawbacks in doing that, unless you have a very simple single project system Generally it is better to have the model in its own assembly as typically you will find it being reused across a number components in a system.
|
|