EF 6 Database first programmatically generate edmx

101 Views Asked by At

I'm trying to create the edmx file as part of an automated build process in order to ensure the code is in sync with the DB.

The emdx diagram doesn't use the complete DB so I have used EntityStoreSchemaGenerator and EntityModelSchemaGenerator in System.Data.Entity.Design in order to only include the tables, views and stored procedures needed.

I can then use the generated csdl, msl and ssdl files to create an edmx file.

The issue is that FunctionImport tags are not generated and nor are complex type tags. These tags are generated when using the edmx designer tool. From what I gather, the edmx designer tool uses the same generator calls (in System.Data.Entity.Design) but seems to produce those extra tags. Is there a way to programmatically get these additional tags auto generated preferably (although not essential) using the System.Data.Entity.Design library?

0

There are 0 best solutions below