Forum Xamarin.iOS

How to run the InsertAllAsync completely even when it thrown exception

dsvdsv USMember

Hi I am using InsertAllAsync method to insert few records in to the database. There is a primary key constraint on the table. But I am getting few duplicate values on the primary key. If I keep a for loop and do InsertAsync I am able to insert all records ignoring duplicate records, but InsertAllAsync throwing exception "Constraint" and not inserting single record in the db. Please let me know any other way to ignore the "Constraint Exception". I have to use only InsertAllAsync.


  • dsvdsv USMember

    We can't run if duplicates values are present. I removed duplicate values before inserting.

  • D_RD_R USMember ✭✭

    @dsv is there any way to find duplicate on InsertAllSync ?

Sign In or Register to comment.