Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 2
    What exactly would you do with a ViewModel ID? Don't the individual objects in the ViewModel have their own ID's anyway? Commented Oct 16, 2014 at 16:42
  • I should probably specify only when the view model is related to a model. Not all view models are related. Commented Oct 16, 2014 at 18:06
  • You have to abandon statelessness. - You have just made the choice to use MVC pointless. Commented Oct 16, 2014 at 22:30
  • Is the ID you are referring to here a database primary key, or something else you are adding to the ViewModel? Commented Oct 21, 2014 at 14:26
  • @Vermis, I think that a database primary key would be a simple ID. A more thorough ID would be any non-modifiable piece of data that allows you to relate your edited object back to the not-yet-edited persisted version so that the edited changes can be persisted. Commented Oct 21, 2014 at 19:27