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 email@example.com
I wonder if someone could assist me. I am running Mindscape Lightspeed 4.0 with Visual Studio 2012 and am testing an MVC4 Internet project.
I am just running the Movies tutorial from www.asp.net however I have modified the project to use a Lightspeed model instead of the Entity framework. I am able to successfully Create, Read and Delete from the MoviesController controller however it is the Update / Edit function that I am having difficulty with. Below are 2 snippets of code showing a temporary workaround to update the movie object followed by the code that works with the Microsoft's entity framework but is not working with Lightspeed.
The snippet of code that is working is ugly as I have to re read the object to get a new instance from the Model and update it with the current instance. I have to do this because the Id of the current instance of the movie class in the HttpPost method changes to 0? Therefore the SaveChanges() does not save anything. The Id is correct in HttpGet method but somewhere between the Get and Post it loses it and changes to 0. Its almost like the entity is being disconnected somehow?
Is there anyone who might be able to assist me?