I am working on mvc project, with repository pattern and entity framework, now on my form i have a sample model
SampleModel
1) name
2) age
3) address
4) notes
5) date updated
I am displaying only following data on the edit form
1) name
2) age
3) address
now if i update the model with missing property values using the repository, the notes, dateupdated field goes null.
My question is how do i update only few selected properties using the repository ( tryupdatemodel not available in repository ) and i dont want to call the original object and map the properites with the updated model.
Is there any way, there must be.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…