P
Pierre
A business logic component creates a registration request for an asp.net
application and it inserts the request to the database. The data access
component returns a request key for the inserted request. After receiving
the key the business logic component sends an email to the user. This whole
process must be a logical transaction. I mean when an error occurs during
sending of the email the system must rollback the request inserted to the
database. For now I just catch if an exception occurs during sending and
delete the request from the database. Is there a more efficient way or a
pattern for this kind of "transactions"?
application and it inserts the request to the database. The data access
component returns a request key for the inserted request. After receiving
the key the business logic component sends an email to the user. This whole
process must be a logical transaction. I mean when an error occurs during
sending of the email the system must rollback the request inserted to the
database. For now I just catch if an exception occurs during sending and
delete the request from the database. Is there a more efficient way or a
pattern for this kind of "transactions"?