Our app is sending multiple requests to a webserver, which in turn inserts records into an Informix database, but some inserts are getting duplicate IDs from the database when using the .Net Core package. However we dont get duplicate IDs when using the .Net Framework package.
I think the problem is how the ID is selected after the insert.
Compare the SELECTs generated from dbContext.SaveChanges() in core (IBM.EntityFrameworkCore 6.0.0.300) to the SELECT from the .Net Framework package(EntityFramework.IBM.DB2 6.4.1).
(IBM.EntityFrameworkCore 6.0.0.300):
INSERT INTO log (log_action, log_date, log_db, log_description, log_loggedby)
VALUES (@p0, @p1, @p2, @p3, @p4);
SELECT * FROM TABLE ( MULTISET ( SELECT FIRST 1 log_id FROM log ORDER BY log_id DESC)) ORDER BY log_id ASC;
(EntityFramework.IBM.DB2 6.4.1):
insert into log(log_db, log_date, log_loggedby, log_action, log_description)
values (@p0, @p1, @p2, @p3, @p4)
; select log_id as "log_id"
from log
where dbinfo('sqlca.sqlerrd2') > 0 and log_id = dbinfo('sqlca.sqlerrd1')
Thanks,
John
------------------------------
John Robinson
------------------------------
#DataManagementGlobal#DataServerDrivers