2

Given:

  1. An empty C# project
  2. 3 loose files: an SSDL, CSDL and a MSL (generated elsewhere)
  3. No EDMX file

What modifications/additions should I perform on project to compile these files into a T4-based ObjectContext (e.g. using POCOs T4 generators)...

  1. if I already have all classes generated for entities?
  2. if I have no classes generated for entities?

Would it be easier to generate the ObjectContext and or classes if I first combine the files into an EDMX with no Designer section?

Danny Varod
  • 17,324
  • 5
  • 69
  • 111

1 Answers1

0

Working solution:

Generate SSDL, CSDL, MSL files and include in project as embedded resources.

Generate EDMX by combining those files and include in project for T4s to look at.

Modify EF's connection string in App.Config: add default namespace of assembly (+ '.') before resources' file names.

Point T4 at EDMX and transform templates.

Danny Varod
  • 17,324
  • 5
  • 69
  • 111