EBOI
9/29/2017 - 8:26 AM

Instrukcja dodawania nowej kolumny do istniejącej bazy danych

Instrukcja dodawania nowej kolumny do istniejącej bazy danych

1. So in Windows Exlorer,right click on the *.edmx file and open with Notepad (or Notepad++/Textpad).

2a. Search for the text <EntityType Name="YourTableNameToAddColumn"> (line [for Procedure table]: 2130).
3a. Add the property <Property Name="YourNewSQLColumnName" Type="varchar" MaxLength="64" />

2b. Search for the text <EntityType Name="YourTableNameToAddColumn"> (line [for Procedure table]: 5981).
3b. Add the property <Property Name="YourNewCodeColumnName" Type="String" Nullable="true" MaxLength="Max" Unicode="true" FixedLength="false" />

4. Search for the text <MappingFragment StoreEntitySet="YourTableNameToAddColumn">
5. Add mapping to the new column <ScalarProperty Name="YourNewColumnCodeName" ColumnName="YourNewColumnSQLName"/>

6. Save the *.edmx file