Hi there, In the legacy system I look after I have to add the same record to a table, twice.
There is an identity on the table that increments with each new record.
If I do the following I get the error: "Cannot add an entity that already exists"
Is there a way to add a record twice without creating another PricingSnapshot object?
PricingSnapshot pricingSnapshot = new PricingSnapshot
{
InvoiceOrderLineId = invoiceOrderLineId,
GrossPaymentValue = grossTotal,
CreatedBy = "Pricing Engine",
CreatedDate = DateTime.Now
};
dBpostChanges.PricingSnapshots.InsertOnSubmit(pricingSnapshot);
dBpostChanges.SubmitChanges();
dBpostChanges.PricingSnapshots.InsertOnSubmit(pricingSnapshot);
dBpostChanges.SubmitChanges();