If two claim post requests come in at about the same time (for example during an import), two claims with the same claim number can both be accepted and saved to the database.
Once duplicate claims are in the database, the GetByClaimNumber method (ClaimsRepository) will throw an exception because it uses the .SingleOrDefaultAsync method and there are multiple records that match the query.
If two claim post requests come in at about the same time (for example during an import), two claims with the same claim number can both be accepted and saved to the database.
Once duplicate claims are in the database, the GetByClaimNumber method (ClaimsRepository) will throw an exception because it uses the .SingleOrDefaultAsync method and there are multiple records that match the query.