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'm having an issue where I've created a view and used the model designer to drag my view over into my visual studio project. When I go to use Update From Source... Lightspeed wants to remove the entity.. I'm really confused by this. |
|
|
Because this is an entity created to support the view its not backed by a table which is why it thinks all the properties should be removed. You will need to ignore this entity on database updates as we are expecting a table to be present to derive the information from for the two way sync.
|
|
|
Okay, then I should be able to use the Entity without issues? I'm getting an ASP error: Invalid object name 'Staffmember'. Please see attached photos. |
|
|
You are not specifying a view name in your query - currently your query against the entity is expecting to use a backing table as thats the default approach which is why you are seeing an error (there is no backing table!). You need to use the .ViewName( e.g. as per http://www.mindscapehq.com/documentation/lightspeed/Advanced-Querying-Techniques/Exploring-the-Query-Object Specify the ViewName property to run the query against a view instead of against the entity’s normal backing table. See Working with Database Views in the chapter Controlling the Database Mapping for details. If you are using LINQ you can use the .WithViewName extension method
|
|
|
Jeremy, I revised my ActionResult method to the following:
It appears I'm getting entries, however all the data in the entries are null. Any advice? [Update] I was able to resolve this. |
|