Comments (4)
Hello @VictorioBerra ,
When you use a syntax similar to this:
context.Entity<IEntityType>("mappingkey")
.UseBulkOptions(options =>
{
});
The UseBulkOptions
will only apply to this specific entity type whenever this key is used. It will not affect any other bulk operations but only those that use this exact mapping key.
Any configuration, in fact, should only apply only whenever you use this mappingkey
and doesn't affect any other chained methods.
However, if you use the UseBulkOperations
in the context such as:
context.UseBulkOptions(options => {}).BulkInsert
it will apply to all bulk operations that will be chained.
Let me know if that's more clear.
Best Regards,
Jon
from dapper-plus.
Hello @VictorioBerra
Can we have a feature to pass a string for the column name for ColumnSynchronizeDeleteKeySubsetExpression?
It should already be supported through the option ColumnSynchronizeDeleteKeySubsetNames
, which allows you to pass a list of strings representing all the column names you want to use.
Also looks like I cannot apply UseBulkOptions() to ThenBulkMerge()? What is the best way to accomplish what I am trying to do above?
The connection.UseBulkOptions
should be only for configurations like BatchSize
that you don't mind applying to every bulk operation that chain after.
We usually recommend putting all custom options directly in the mapping and using a mapping key instead: https://dapper-plus.net/getting-started-mapping#mapper-key , which allows you to map an entity type in multiple different ways.
Let me know if you need more help with any of your two questions.
Best Regards,
Jon
from dapper-plus.
Okay that answers my questions. UseBulkOptions()
will apply to every chained Bulk operation.
I will switch to mapping keys since that seems less "global" and my mappings can apply directly to bulk operations.
Just some extra clarification, ColumnSynchronizeDeleteKeySubsetNames
can only be applied via UseBulkOptions
and cannot be set in mapping and used with mapping keys right? It applies to the entire bulk operation across all entities?
from dapper-plus.
Makes sense to me. Thanks!
from dapper-plus.
Related Issues (20)
- A transport-level error for NVarchar(max) column when using auditing HOT 7
- Received an invalid column length from the bcp client for colid HOT 3
- IndexOutOfRangeException on BulkMerge operations HOT 1
- ILogger not logging, but Console.WriteLine works? HOT 3
- Configure Merge for concurrency handling HOT 3
- Ids not coming back after first BulkInsert HOT 4
- Update trigger on target table causes BulkMerge to fail HOT 3
- Feature Request - suppress update if nothing changed. HOT 2
- BulkInsert doesn't generate primary key for multiple concurrent submission HOT 7
- Support for Sybase for Bulk Insert HOT 1
- Skip duplicate records on bulk insert HOT 5
- Avoid output HOT 7
- BulkInsert Postgres => An error occured while retrieving the InformationSchemaTable information. See the inner exception for details. HOT 4
- Dapper Plus can't map Id when use galera cluster HOT 3
- bulk insert very slow on mariadb version≥10.6.0 HOT 2
- PostgreSQL BulkMerge / BulkUpdate always returns all rows as update HOT 6
- Bulk Insert throws the exception 'Unknown data type' whenever inserting GUID to MySQL HOT 4
- Does this support DateOnly/TimeOnly? HOT 6
- Does this support Aot HOT 1
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 dapper-plus.