SlideShare a Scribd company logo
The following table lists important Fluent API methods.
Configurations Fluent API Methods Usage
Model-wide
Configurations
HasDefaultSchema() Specifies the default database schema.
ComplexType() Configures the class as complex type.
Entity
Configurations
HasIndex() Configures the index property for the entity type.
HasKey() Configures the primary key property for the entity type.
HasMany() Configures the Many relationship for one-to-many or many-to-
many relationships.
HasOptional() Configures an optional relationship which will create a nullable
foreign key in the database.
HasRequired() Configures the required relationship which will create a non-
nullable foreign key column in the database.
Ignore() Configures that the class or property should not be mapped to
a table or column.
Map() Allows advanced configuration related to how the entity is
mapped to the database schema.
MapToStoredProcedures() Configures the entity type to use INSERT, UPDATE and
DELETE stored procedures.
ToTable() Configures the table name for the entity.
Property
Configurations
HasColumnAnnotation() Sets an annotation in the model for the database column used
to store the property.
IsRequired() Configures the property to be required on SaveChanges().
IsConcurrencyToken() Configures the property to be used as an optimistic
concurrency token.
The following table lists important Fluent API methods.
IsOptional() Configures the property to be optional which will create a
nullable column in the database.
HasParameterName() Configures the name of the parameter used in the stored
procedure for the property.
HasDatabaseGeneratedOption() Configures how the value will be generated for the
corresponding column in the database e.g. computed, identity
or none.
HasColumnOrder() Configures the order of the database column used to store the
property.
HasColumnType() Configures the data type of the corresponding column of a
property in the database.
HasColumnName() Configures the corresponding column name of a property in
the database.
IsConcurrencyToken() Configures the property to be used as an optimistic
concurrency token.

More Related Content

What's hot (20)

PPTX
Microsoft Tech Club Cairo University "MSTC'16 Builders and Developers " Sessi...
Wagdy Mohamed
 
PDF
Mysql cheatsheet
Adolfo Nasol
 
PPT
Sequences and indexes
Balqees Al.Mubarak
 
PPTX
1.2 sql create and drop table
MLG College of Learning, Inc
 
PDF
SQL for Data Science Tutorial | Data Science Tutorial | Edureka
Edureka!
 
PPTX
STRUCTURE OF SQL QUERIES
VENNILAV6
 
PPTX
MySQL Essential Training
HudaRaghibKadhim
 
PDF
Chapter8 my sql revision tour
KV(AFS) Utarlai, Barmer (Rajasthan)
 
PPT
SQL Tutorial - How To Create, Drop, and Truncate Table
1keydata
 
PDF
Creating, altering and dropping tables
punu_82
 
DOCX
Modeling Hierarchies In Database Design
Praveen Kumar Peddi
 
PPT
SQL Tutorial - Basic Commands
1keydata
 
ODP
Views for hackers v1.3
Karim Ratib
 
PPT
Doubly linked list
chauhankapil
 
PDF
Day 2b i/o.pptx
Adrien Melquiond
 
PDF
Sql commands
Mohd Tousif
 
DOC
Sql
krishna_v111
 
PPTX
SQL interview questions by Jeetendra Mandal - part 2
jeetendra mandal
 
PPTX
Data structure in perl
sana mateen
 
Microsoft Tech Club Cairo University "MSTC'16 Builders and Developers " Sessi...
Wagdy Mohamed
 
Mysql cheatsheet
Adolfo Nasol
 
Sequences and indexes
Balqees Al.Mubarak
 
1.2 sql create and drop table
MLG College of Learning, Inc
 
SQL for Data Science Tutorial | Data Science Tutorial | Edureka
Edureka!
 
STRUCTURE OF SQL QUERIES
VENNILAV6
 
MySQL Essential Training
HudaRaghibKadhim
 
Chapter8 my sql revision tour
KV(AFS) Utarlai, Barmer (Rajasthan)
 
SQL Tutorial - How To Create, Drop, and Truncate Table
1keydata
 
Creating, altering and dropping tables
punu_82
 
Modeling Hierarchies In Database Design
Praveen Kumar Peddi
 
SQL Tutorial - Basic Commands
1keydata
 
Views for hackers v1.3
Karim Ratib
 
Doubly linked list
chauhankapil
 
Day 2b i/o.pptx
Adrien Melquiond
 
Sql commands
Mohd Tousif
 
SQL interview questions by Jeetendra Mandal - part 2
jeetendra mandal
 
Data structure in perl
sana mateen
 

Similar to Fluent api configuration (20)

PPTX
Quick And Dirty Databases
cwarren
 
PPTX
chapter9-SQL.pptx
Yaser52
 
DOC
Module 3
cs19club
 
PDF
Intake 37 ef2
Mahmoud Ouf
 
PPTX
Entity Frame Work Core.pptx
PrachiPatel779586
 
PPTX
Ado.net with asp.net
Sireesh K
 
ODP
BIS06 Physical Database Models
Prithwis Mukerjee
 
ODP
BIS06 Physical Database Models
Prithwis Mukerjee
 
PDF
9 Python programming notes for ktu physics and computer application semester 4
ebindboby1
 
PPTX
GROUP-4-Database-Connectivity-with-MySqL.pptx
JohnLhoydMaderable
 
DOCX
Android sq lite-chapter 22
Dr. Ramkumar Lakshminarayanan
 
PPT
Db1 lecture4
Sherif Gad
 
DOCX
Android database tutorial
info_zybotech
 
PPTX
Introduction to structured query language (sql) (1)
RajniKashyap9
 
PPTX
Mapping Data Flows Training deck Q1 CY22
Mark Kromer
 
PPTX
Miracle Open World 2011 - XML Index Strategies
Marco Gralike
 
PPT
Database
Mayank Garg
 
PPT
Introduction to Structured Query Language (SQL).ppt
Ashwini Rao
 
PPTX
Unit1
Jay Patel
 
Quick And Dirty Databases
cwarren
 
chapter9-SQL.pptx
Yaser52
 
Module 3
cs19club
 
Intake 37 ef2
Mahmoud Ouf
 
Entity Frame Work Core.pptx
PrachiPatel779586
 
Ado.net with asp.net
Sireesh K
 
BIS06 Physical Database Models
Prithwis Mukerjee
 
BIS06 Physical Database Models
Prithwis Mukerjee
 
9 Python programming notes for ktu physics and computer application semester 4
ebindboby1
 
GROUP-4-Database-Connectivity-with-MySqL.pptx
JohnLhoydMaderable
 
Android sq lite-chapter 22
Dr. Ramkumar Lakshminarayanan
 
Db1 lecture4
Sherif Gad
 
Android database tutorial
info_zybotech
 
Introduction to structured query language (sql) (1)
RajniKashyap9
 
Mapping Data Flows Training deck Q1 CY22
Mark Kromer
 
Miracle Open World 2011 - XML Index Strategies
Marco Gralike
 
Database
Mayank Garg
 
Introduction to Structured Query Language (SQL).ppt
Ashwini Rao
 
Unit1
Jay Patel
 
Ad

Recently uploaded (20)

PPT
Oxygen Co2 Transport in the Lungs(Exchange og gases)
SUNDERLINSHIBUD
 
PDF
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
PPTX
Types of Bearing_Specifications_PPT.pptx
PranjulAgrahariAkash
 
PDF
POWER PLANT ENGINEERING (R17A0326).pdf..
haneefachosa123
 
PPTX
Structural Functiona theory this important for the theorist
cagumaydanny26
 
PPTX
MPMC_Module-2 xxxxxxxxxxxxxxxxxxxxx.pptx
ShivanshVaidya5
 
PPTX
Benefits_^0_Challigi😙🏡💐8fenges[1].pptx
akghostmaker
 
PDF
A presentation on the Urban Heat Island Effect
studyfor7hrs
 
PPTX
Innowell Capability B0425 - Commercial Buildings.pptx
regobertroza
 
PPTX
Electron Beam Machining for Production Process
Rajshahi University of Engineering & Technology(RUET), Bangladesh
 
PDF
Statistical Data Analysis Using SPSS Software
shrikrishna kesharwani
 
PDF
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
PPTX
EC3551-Transmission lines Demo class .pptx
Mahalakshmiprasannag
 
PPTX
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
PPTX
Pharmaceuticals and fine chemicals.pptxx
jaypa242004
 
PDF
Ethics and Trustworthy AI in Healthcare – Governing Sensitive Data, Profiling...
AlqualsaDIResearchGr
 
PPTX
ISO/IEC JTC 1/WG 9 (MAR) Convenor Report
Kurata Takeshi
 
PDF
PRIZ Academy - Change Flow Thinking Master Change with Confidence.pdf
PRIZ Guru
 
PPTX
MobileComputingMANET2023 MobileComputingMANET2023.pptx
masterfake98765
 
PPTX
NEUROMOROPHIC nu iajwojeieheueueueu.pptx
knkoodalingam39
 
Oxygen Co2 Transport in the Lungs(Exchange og gases)
SUNDERLINSHIBUD
 
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
Types of Bearing_Specifications_PPT.pptx
PranjulAgrahariAkash
 
POWER PLANT ENGINEERING (R17A0326).pdf..
haneefachosa123
 
Structural Functiona theory this important for the theorist
cagumaydanny26
 
MPMC_Module-2 xxxxxxxxxxxxxxxxxxxxx.pptx
ShivanshVaidya5
 
Benefits_^0_Challigi😙🏡💐8fenges[1].pptx
akghostmaker
 
A presentation on the Urban Heat Island Effect
studyfor7hrs
 
Innowell Capability B0425 - Commercial Buildings.pptx
regobertroza
 
Electron Beam Machining for Production Process
Rajshahi University of Engineering & Technology(RUET), Bangladesh
 
Statistical Data Analysis Using SPSS Software
shrikrishna kesharwani
 
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
EC3551-Transmission lines Demo class .pptx
Mahalakshmiprasannag
 
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
Pharmaceuticals and fine chemicals.pptxx
jaypa242004
 
Ethics and Trustworthy AI in Healthcare – Governing Sensitive Data, Profiling...
AlqualsaDIResearchGr
 
ISO/IEC JTC 1/WG 9 (MAR) Convenor Report
Kurata Takeshi
 
PRIZ Academy - Change Flow Thinking Master Change with Confidence.pdf
PRIZ Guru
 
MobileComputingMANET2023 MobileComputingMANET2023.pptx
masterfake98765
 
NEUROMOROPHIC nu iajwojeieheueueueu.pptx
knkoodalingam39
 
Ad

Fluent api configuration

  • 1. The following table lists important Fluent API methods. Configurations Fluent API Methods Usage Model-wide Configurations HasDefaultSchema() Specifies the default database schema. ComplexType() Configures the class as complex type. Entity Configurations HasIndex() Configures the index property for the entity type. HasKey() Configures the primary key property for the entity type. HasMany() Configures the Many relationship for one-to-many or many-to- many relationships. HasOptional() Configures an optional relationship which will create a nullable foreign key in the database. HasRequired() Configures the required relationship which will create a non- nullable foreign key column in the database. Ignore() Configures that the class or property should not be mapped to a table or column. Map() Allows advanced configuration related to how the entity is mapped to the database schema. MapToStoredProcedures() Configures the entity type to use INSERT, UPDATE and DELETE stored procedures. ToTable() Configures the table name for the entity. Property Configurations HasColumnAnnotation() Sets an annotation in the model for the database column used to store the property. IsRequired() Configures the property to be required on SaveChanges(). IsConcurrencyToken() Configures the property to be used as an optimistic concurrency token.
  • 2. The following table lists important Fluent API methods. IsOptional() Configures the property to be optional which will create a nullable column in the database. HasParameterName() Configures the name of the parameter used in the stored procedure for the property. HasDatabaseGeneratedOption() Configures how the value will be generated for the corresponding column in the database e.g. computed, identity or none. HasColumnOrder() Configures the order of the database column used to store the property. HasColumnType() Configures the data type of the corresponding column of a property in the database. HasColumnName() Configures the corresponding column name of a property in the database. IsConcurrencyToken() Configures the property to be used as an optimistic concurrency token.