How should the repository pattern update the ID of the object after a save to database method?
问题 After I create my POCO in memory, I call the Save method on the repository object. I need to then update the POCO with the database ID created during the save operation. Should I pass the object in using ref, simply have the save method return the ID and manually update the object from the calling page, or what? Here is some sample code: public GiftCertificateModel { public int GiftCerticiateId {get;set;} public string Code {get;set;} public decimal Amount {get;set;} public DateTime