Created
April 4, 2016 22:00
-
-
Save rionmonster/4641b5e04f50b12a04e138dcb6372002 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public COMP UpdateComp(COMP newObj, int idOriginal) | |
{ | |
var original = _context.Comps.FirstOrDefault(m => m.ID == idOriginal); | |
// Update these properties using your new information | |
original.CHECKLISTs = newObj.CHECKLISTs; | |
original.Division = newObj.Division; | |
_context.SaveChanges(); | |
// When you return the original it should have those changes made | |
return original; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment