mvc 2.0 updatemodel and my ID Column
Posted
by femi
on Stack Overflow
See other posts from Stack Overflow
or by femi
Published on 2010-03-12T14:44:54Z
Indexed on
2010/03/12
14:47 UTC
Read the original article
Hit count: 324
Hello,
I have created a create view within my MVC 2.0 Application and by default it included a field for the integer ID Column.
This is definitely a field i do not need.
If i remove the field and use updatemodel when trying to create the object in code, will something break because it doesnt see my ID column data being passed in, even though it is auto increment?
Also, i noticed that in the NerdDinner example, updatemodel was used and after that the repository.save method was called.
I thought that updatemodel would save the object to the database..why then call the .save method afterwards? Or have i missed something?
Any help with this would be appreciated.
Cheers
© Stack Overflow or respective owner