Entity Framework CTP4 ã§ã¯å½åè¦ç´ãå©ç¨ããã ãã§ä¸è¬çãªå©ç¨ã«ããã¦ååãªã¢ãã«ãä½æãããã¨ãåºæ¥ã¾ãããModelBuilder ã® Fluent API ãå©ç¨ãããã¨ã§ãã詳細ãªæ°¸ç¶åãããã³ã°ã«ã¼ã«ãå®ç¾©ãããã¨ãåºæ¥ã¾ãã åºæ¬çãªé¨åã ãã§ããè¦ç´ã¨ Fluent API ã使ã£ãå ´åã®éããæ¯ã¹ã¦ã¿ã¾ãã ãã©ã¤ããªãã¼ è¦ç´ public class Product { // åå + Id åã®ããããã£ãèªåçã«ãã©ã¤ããªãã¼ã¨ãã¦æ±ããã public int ProductId { get; set; } } Fluent API protected override void OnModelCreating(ModelBuilder modelBuilder) { // ãã©ã¤ããªãã¼ã¨ãã¦æ±ãããããã£ãæå® modelBuilder.
{{#tags}}- {{label}}
{{/tags}}