Hello Kavya,
Hope you're doing well.
You may call the same Client Action and receive an ID (Table Identifier) as an Input Parameter.
Then if your ID is equal NullIdentifier(), it means that you're creating/adding a new record to your database.
On the other hand, if your ID is not null, it means that you're updating/editing the record with that ID in the database.
Inside of your client action, you should call a Server Action where you use CreateOrUpdate<Entity> action, in order to create or update your record.
Hope that this helps you!
Kind regards,
Rui Barradas