diff --git a/src/SQLiteAsync.cs b/src/SQLiteAsync.cs index 85a0b00e..73d0ba41 100644 --- a/src/SQLiteAsync.cs +++ b/src/SQLiteAsync.cs @@ -227,10 +227,13 @@ Task GetMappingAsync< [RequiresUnreferencedCode ("This method requires ''DynamicallyAccessedMemberTypes.All' on the runtime type of all objects in 'objects'.")] #endif Task InsertAllAsync (IEnumerable objects, string extra, bool runInTransaction = true); + + Task InsertAllAsync (IEnumerable objects, #if NET8_0_OR_GREATER - [RequiresUnreferencedCode ("This method requires ''DynamicallyAccessedMemberTypes.All' on the runtime type of all objects in 'objects'.")] + [DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.All)] #endif - Task InsertAllAsync (IEnumerable objects, Type objType, bool runInTransaction = true); + Type objType, + bool runInTransaction = true); #if NET8_0_OR_GREATER [RequiresUnreferencedCode ("This method requires ''DynamicallyAccessedMemberTypes.All' on the runtime type of 'obj'.")] #endif @@ -1424,10 +1427,13 @@ public Task InsertAllAsync (IEnumerable objects, string extra, bool runInTr /// /// The number of rows added to the table. /// + public Task InsertAllAsync ( + IEnumerable objects, #if NET8_0_OR_GREATER - [RequiresUnreferencedCode ("This method requires ''DynamicallyAccessedMemberTypes.All' on the runtime type of all objects in 'objects'.")] + [DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.All)] #endif - public Task InsertAllAsync (IEnumerable objects, Type objType, bool runInTransaction = true) + Type objType, + bool runInTransaction = true) { return WriteAsync (conn => conn.InsertAll (objects, objType, runInTransaction)); }