Develop Together2
Develop Together -2 (Creating Mapping) :
The purpose of creating the mapping process will be to specify the length and types we will give for columns to the database.


Enter the Bussiness layer and right click the Mappings folder, select Add->Class and add it as (ModuleName)Mapping in Name.

Then add (ModuleName)Mapping: EntityTypeConfiguration<(ModuleName(Entities))> . Thanks to the EntityTypeConfiguration plugin, we will be able to perform mapping without any problems.
Here are the important points: HasMaxLength,HasKey, HasColumnName ve HasPrecision The values that we will give to these 4 fields HasKey=Primary Key , that is, we determine our unique value field and add the automatic increment to its properties.
HasMaxLength is the maximum number of lengths we will give for string columns, This is how we send the HasColumnName column to the database.
With HasPrecision, we specify how many digits before and after the comma to the decimal values.