0

there is a schema tag in edmx XML file defined for each entity being used in edmx ...

<EntitySet Name="AUDITLOG" EntityType="My_EFModel.Store.AUDITLOG" store:Type="Tables" Schema="MYPRODUCTUSER" />

is there any way i can set this Schema Attribute through my application's variable ... Are my application's variable public to this edmx XML file.? ...

i would like to change this as follows so that schema attribute becomes configurable:

<EntitySet Name="AUDITLOG" EntityType="My_EFModel.Store.AUDITLOG" store:Type="Tables" Schema="@MyProject'sApplication'sVariable" />

The problem is that we work on a product database, and another team takes our Database (say A) and creates their seperate database (Say B), The two databases are exact copy of each other that is why i want Schema attribute to be configurable ...

Sana.91
  • 1,999
  • 4
  • 33
  • 52
  • I'd say no, as far as I know isn't the same table in two different schemas considered a different table, also this file is processed at build time not run time. Could you clarify the end goal and maybe someone will offer a different solution. – matt_lethargic Apr 10 '15 at 08:37
  • @matt_lethargic Yes, added explaination, please re read the Question. – Sana.91 Apr 10 '15 at 11:02
  • So you just want to change the connection string and point at database B?! The schema would stay the same surely – matt_lethargic Apr 10 '15 at 11:10
  • @matt_lethargic no .... its name is different .. , for team X : Schema="MyProductUser" and for Team Y: Schema = "SomeOtherUser" – Sana.91 Apr 10 '15 at 11:15
  • @matt_lethargic ... this is the reason Schema attribute should be configurable in this case ... is'nt it? – Sana.91 Apr 10 '15 at 11:16
  • the database are same BUT their Schema name , Connection strings are kept different – Sana.91 Apr 10 '15 at 12:17
  • Have to tried searching for way to change schema in code http://stackoverflow.com/questions/14902245/entity-framework-and-multiple-schemas – matt_lethargic Apr 14 '15 at 08:35

0 Answers0