Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I Believe that this is because Id is set as private, so the Model Binder can't set the value.</p> <p>The best way to handle this would be to create a ViewModel. The basics of a ViewModel is creating a smaller model per view and mapping between the the domain model and the view model.</p> <p>Basically, when you're not using ViewModels you're open over-posting/under-posting (<a href="http://bradwilson.typepad.com/blog/2010/01/input-validation-vs-model-validation-in-aspnet-mvc.html" rel="nofollow noreferrer">Brad Wilson's blog</a>) which is a BIG security problem. There also other benefits such as better refactoring, better validation and better seperation of concerns.</p> <p>More info: </p> <p><a href="https://stackoverflow.com/questions/664205/viewmodel-best-practices">ViewModel Best Practices</a></p> <p><a href="https://stackoverflow.com/questions/5306655/using-view-models-in-asp-net-mvc-3">Using view models in ASP.NET MVC 3</a></p> <p>You've also got some unrelated stuff going there like that Modified property. nHibernate has built-in support for this kind of property using the Version mapping (<a href="http://ayende.com/Blog/archive/2009/04/15/nhibernate-mapping-concurrency.aspx" rel="nofollow noreferrer">Ayende's blog</a> , <a href="http://www.codeinsanity.com/2009/05/fluent-nhibernate-mappings-property.html" rel="nofollow noreferrer">fluent nhibernate</a>)</p> <p>Also, it's preferred using the Get/Load methods of the Session for loading objects by id instead of querying for the object (<a href="http://ayende.com/Blog/archive/2009/04/30/nhibernate-ndash-the-difference-between-get-load-and-querying-by.aspx" rel="nofollow noreferrer">Ayende's blog</a>).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload