Specifies whether the insert query generation for a class should include the ID property or exclude it.
- Namespace
- DbSyncKit
.DB .Attributes - Base Types
-
- Attribute
graph BT
Type-->Base0["Attribute"]
Type["GenerateInsertWithIDAttribute"]
class Type type-node
Syntax
[AttributeUsage(AttributeTargets.Class)]
public class GenerateInsertWithIDAttribute : Attribute
Remarks
This attribute can be applied to classes to indicate whether the ID property's value should be included
in the insert query generation. For example, it can be used to determine whether the ID property should be
part of the generated insert query or excluded. The IncludeIdentityInsert property can contain database-specific
statements that affect identity insert behavior (e.g., SET IDENTITY_INSERT for MSSQL), or similar statements
applicable to other databases like MySQL or PostgreSQL.
Attributes
Type | Description |
---|---|
AttributeUsage |
Constructors
Name | Summary |
---|---|
Generate |
Initializes a new instance of the GenerateInsertWithIDAttribute class.
|
Properties
Name | Property Type | Summary |
---|---|---|
GenerateWithID | bool |
Gets a value indicating whether the insert query generation should include the ID property.
|
Include |
bool |
Gets a value indicating whether to include database-specific SQL statements during insert query generation
that affect identity insert behavior (e.g., SET IDENTITY_INSERT for MSSQL).
|