Class TransactionResult
This class represents the results of a transaction that was processed.
public class TransactionResult
- Inheritance
-
TransactionResult
- Inherited Members
Remarks
This class holds the results of a transaction. It can tell the users the number of succeeded record and the number of failed records. It also has a dictionary that holds the individual reasons that certain records fails by FeatureId. If you are implementing this class it is important that you provide as much information about the transaction results to your users.
Constructors
TransactionResult()
This is the class constructor.
public TransactionResult()
Remarks
This is the default constructor and is typically not used.
TransactionResult(int, int, Dictionary<string, string>, TransactionResultStatus)
This is the class constructor.
public TransactionResult(int totalSuccessCount, int totalFailureCount, Dictionary<string, string> failureReasons, TransactionResultStatus transactionResultStatus)
Parameters
totalSuccessCount
inttotalFailureCount
intfailureReasons
Dictionary<string, string>transactionResultStatus
TransactionResultStatus
Remarks
None.
Properties
FailureReasons
This property gets and sets the dictionary that contains the reasons for failure.
public Dictionary<string, string> FailureReasons { get; }
Property Value
Remarks
If there are failing records we suggest you add the failure reasons to this dictionary. It is also suggested that you use the FeatureId as the key of the Dictionary.
TotalFailureCount
This property gets and sets the total number of records that we committed unsuccessfully.
public int TotalFailureCount { get; set; }
Property Value
Remarks
None
TotalSuccessCount
This property gets and sets the total number of records that we committed successfully.
public int TotalSuccessCount { get; set; }
Property Value
Remarks
None
TransactionResultStatus
This property gets and sets the result status of the transaction.
public TransactionResultStatus TransactionResultStatus { get; set; }
Property Value
Remarks
This property returns the results of the transaction. If all of the records committed fine then you get a success status. If any of the records fail then you get a failure status though some of the records may have committed.