Change db table name in EF4 (entity framework 4)

后端 未结 6 2112
离开以前
离开以前 2020-12-01 18:53

Does anyone know how to change the mapped db table for an entity in EF4 (entity framework 4)?

Later edit: I think i\'ve found the place where the table names are def

6条回答
  •  庸人自扰
    2020-12-01 19:05

    If you just need to change the name of the table you can:

    1. Open EDMX file with XML Editor.
    2. Locate SSDL section in it.
    3. Locate entity set element for example .
    4. Add Table="MyTableName" attribute.

    Here is a complete CSDL, SSDL, MSL specification.

    Hope that helps.

提交回复
热议问题