I used ado.net. Here is the code i used for one of the metrics tests. Keep in mind i've also tried adapter, with and without unit of work and transactions, etc. getting the same results each time
Removed some code for brevity
ADO:
using (SqlCeConnection lconn = new SqlCeConnection(Utilities.gsConn)) {
SqlCeCommand cmd = new SqlCeCommand("INSERT INTO EventAudit([EventAuditId],[DeviceId],[EventId],[UserName],[FacilityName],[LaneName],[EventAuditDate],[Message],[Synced]) VALUES(@EventAuditId,@DeviceId,@EventId,@UserName,@FacilityName,@LaneName,@EventAuditDate,@Message,@Synced)", lconn);
cmd.CommandType = CommandType.Text;
cmd.Parameters.Add(new SqlCeParameter("@EventAuditId", SqlDbType.Int, 4, "EventAuditId"));
...
cmd.Prepare();
lconn.Open();
for (int i = 1; i <= liIterations; i++) {
cmd.Parameters[0].Value = i;
...
cmd.ExecuteNonQuery();
}
lconn.Close();
}
LLBLGen
UnitOfWork uow = new UnitOfWork();
for (int i = 1; i <= liIterations; i++) {
EventAuditEntity lentEventAudit = new EventAuditEntity();
lentEventAudit.EventAuditId = i;
...
uow.AddForSave(lentEventAudit);
}
uow.Commit(new Transaction(IsolationLevel.ReadCommitted, "Save EventAudit test"), true);
Thanks, Josh