I'm facing an issue in my Entity-Framework where we create the data model by database-first (on Oracle). This provides us a generated .edmx. We noticed that with the Schema being in the .dll it's not possible to use this datamodel on a different schema name other then what's in the .edmx. We also figured out that when you remove the Schema name you can use your data.dll on different schemas.
My question is, is it possible to create a .bat file to loop over the text and remove all Schema="....." values?
I figured out some websites, but I don't know how to do it that the correct is being deleted
Replacing characters in a text file from Windows batch file
Snapshot of our .edmx
<EntityContainer Name="ModelStoreContainer">
<EntitySet Name="BS_AMBITION" EntityType="Self.BS_AMBITION" Schema="KNOWLEDGEBASE_MODEL" store:Type="Tables" />
<EntitySet Name="BS_BRANCH" EntityType="Self.BS_BRANCH" Schema="KNOWLEDGEBASE_MODEL" store:Type="Tables" />
<EntitySet Name="BS_GROUP" EntityType="Self.BS_GROUP" Schema="KNOWLEDGEBASE_MODEL" store:Type="Tables" />
</EntityContainer>
The result should be (without the Schema attribute):
<EntityContainer Name="ModelStoreContainer">
<EntitySet Name="BS_AMBITION" EntityType="Self.BS_AMBITION" store:Type="Tables" />
<EntitySet Name="BS_BRANCH" EntityType="Self.BS_BRANCH" store:Type="Tables" />
<EntitySet Name="BS_GROUP" EntityType="Self.BS_GROUP" store:Type="Tables" />
</EntityContainer>