dan-gph
dan-gph

Reputation: 16909

What is the difference between Add and Update in SubSonic3 SimpleRepository?

What is the difference between IRepository.Add and IRepository.Update in SubSonic3 SimpleRepository?

Upvotes: 2

Views: 157

Answers (2)

No Body
No Body

Reputation: 252

Add returns objects, where as Update is an integer.

Upvotes: 0

Adam Cooper
Adam Cooper

Reputation: 8677

Add should perform a sql Insert whereas Update should perform a sql Update. So Add is for new objects i.e. without a primary key value assigned.

Upvotes: 2

Related Questions