Created
May 20, 2019 09:02
-
-
Save ParmanBabra/f86fe6355d5825076d680d8021e298c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override void OnModelCreating(ModelBuilder modelBuilder) | |
{ | |
... | |
modelBuilder.Entity<Product>(builder => // ระบุ Model ที่ต้องการ Map กับ Table | |
{ | |
... | |
builder.Property(en => en.Weight) | |
.HasColumnName("Weight") | |
.HasColumnType<float>("decimal(12, 4)"); | |
}); | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment