Comments (7)
Please write more info:
Entity class definition your are trying to Insert and
test example of values in the model list.
You could also download the library, add that code into TestProject, and try to reproduce it there.
Or in your project replace Nuget with the Source library and then debug it.
from efcore.bulkextensions.
Thanks for the prompt response.
My mistake, was using version 2.0.9 with e.f core version 2.0, installed the 2.0.8 version and it seems to go through alright.
Found a bug while debugging this. When using a namespace with tables the extensions don not add square brackets with namespace. For namespace [Payment] it sends the query as Payment.[UserTransaction] which would break if some one is using a keyword as namespace name.
from efcore.bulkextensions.
Could you explain more what do you mean by Namespace in the SQL sense?
Db schema or something else ?
from efcore.bulkextensions.
from efcore.bulkextensions.
Added brackets [ ] around DbSchema, NuGet 2.1.3
from efcore.bulkextensions.
Great, thanks.
I was wondering if it is possible for you to add and example on how one might save related entities, both with bulk insert.
For example, we have a "Parent" entity and "Child" entity.
class Parent { int id , string name }
class Child { int id, int name, int ParentId }
Both have one to one relationship.
Both collections are populated, with child referring to Parent but no ParentId yet, as Parent is not saved.
First we insert a list of "Parent" with bulk insert, with setoutputidentity config set to true.
Parent collection is saved in db and Id property gets updated. Now the question is how do this change can be propagated to Child. I have tried adding them both to DbContext as AddRange() but still the foreign key of Child is not populated.
Thanks
from efcore.bulkextensions.
In the following issue there is an example:
#53
I will see to copy part of this into README so that it's more visible.
from efcore.bulkextensions.
Related Issues (20)
- BulkInsertOrUpdateAsync performance questions HOT 3
- Using EF Core 8 Complex Property results in error "Sequence contains no matching element"
- When using PostgreSQL to batch insert DateTime.Now data, there might be a time offset.
- BulkExtensions determines target DbContext incorrectly when calls to different database servers in parallel HOT 1
- VULN: CVE-2024-32655 in Npgsql dependency HOT 3
- BulkInsertOrUpdate doesn't return Identity when no insert or update happen
- not present in the dictionary.
- can BulkInsert support my custom ValueGenerator for Id column HOT 1
- BulkSaveChangesAsync leaves tracked entities in state of "Added" even after successful save. HOT 2
- Spatial support in SQLite for Point
- BulkRead: System.NotSupportedException: 'Specified method is not supported.'
- BulkInsert produces sytanx error on PostgreSQL (version 6.x) HOT 1
- Bulk operation fails when owned type has enum member on PostgreSQL
- `SharedTypeEntity` don't work with bulk operations HOT 1
- [MySql/MariaDb] Insert an boolean type has invalid result (Always insert true in a bit column) HOT 2
- Question : Set value on shadow properties "on save" HOT 1
- Unable to cast object of type 'System.Int64' to type 'System.Nullable`1[System.Int32]' HOT 1
- PostgreSQL Table-Per-Hierarchy Inheritance Is Not Working HOT 1
- Truncate method with custom table name HOT 1
- BulkInsertAsync is assigning negative values to inserted entries' primary keys HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from efcore.bulkextensions.