Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Code Firstアプローチを使用してEntity Framework 5で手動テーブルマッピングを行う方法は?
テーブル マッピングとは、データベースのテーブル名を別の名前のエンティティ クラスに関連付けることです。
これは非常に簡単です。
[Table("Foo")] public class Bar { // properties }
流れるような API の場合:
protected override void OnModelCreating(DbModelBuilder modelBuilder) { modelBuilder.Entity<MyEntity>().ToTable("MyTargetTable"); }