Reputation: 24053
Assume I just updated my model and added a table with 30 columns.
Now I need to create a business class with this 30 properties.
I don't want to use any tools that created this class but I only want to be able to copy the names of the properties from the edmx file.
Is there any good way to do so? Copy and paste each property is very hard job to do.
Upvotes: 0
Views: 222
Reputation: 793
You can open the edmx file using another editor. To do this you can right click the edmx file and open it with XML (Text) Editor. Then you have to find the section where your properties are described and copy it. For example:
<EntityType Name="AccessItems">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
<Property Name="Name" Type="varchar" Nullable="false" MaxLength="128" />
<Property Name="Path" Type="varchar" MaxLength="256" />
<Property Name="IsActive" Type="bit" Nullable="false" />
<Property Name="IsModule" Type="bit" Nullable="false" />
<Property Name="Parent_ID" Type="int" />
</EntityType>
If you need just the names of the properties, you can select only the data you want using Alt+Shift+The Arrow Keys and then just clear the unneeded things, as some property names will be longer than others and you'll have some other symbols. Hope this helps!
Upvotes: 1