Using EntitiesToDTOs.v3.*

Index


Main screen and Source tab

20121119_204600.png
  1. Source Type: In this version we have Edmx option available, new source types will be available soon like POCO/Code-First.
  2. Available sources: When Edmx source type is selected it shows the Edmx files available in your Solution to use as the source of your DTOs and Assemblers.
  3. Customize: Here you can customize which types are going to be the source of the DTOs and Assemblers generated.
    1. Warning System: If a type is checked to be generated and it has associations to another type that is not checked, a warning icon is shown in the first column. Leave your mouse over the warning icon to see a tooltip indicating which is the issue, note that the generation can still run and that's why they are only warnings.
  4. Name: Type name.
  5. Type: This is the source type, it can be an Entity or a Complex Type.
  6. Generate: If checked, DTOs (and optionally Assemblers) will be generated for this type.
  7. All Types: Toggles the generation of all types.
  8. Complex Types: Toggles the generation of all Complex types.
  9. Entity Types: Toggles the generation of all Entity types.
  10. Donate: Opens a browser and navigates to the Donate page of EntitiesToDTOs.
  11. Generate: Starts the generation of DTOs (and Assemblers optionally). A progress dialog is shown and when the process ends a message is shown indicating the final status. If warnings are encountered, they will be shown in the Error List pane of Visual Studio.
  12. Config: Click on the arrow at the right of this button and two options will be shown, Export and Import.
    1. Export: Creates a file that contains all the current generation options (e.g.: to share with your team). A good practice is to create this file at the same level as the source (e.g.: the Edmx file), and then add it to the project in Visual Studio using the "Add > Existing Item..." option, so when you check in, the file gets into TFS and downloaded by all the team.
    2. Import: Reads the configuration options present in a file that was created by using the Export option. Options detected will be shown in EntitiesToDTOs tool.
  13. Cancel: Closes EntitiesToDTOs.
  14. Advertising: Displays advertising to support the tool. When clicked it opens a browser and navigates to the advert URL. If EntitiesToDTOs advert saying "YOUR AD HERE" is shown, when clicked it will take you to the Advertising page of EntitiesToDTOs.
  15. Tabs: These are the tabs where you can customize all the generation and configure EntitiesToDTOs options.
  16. Help: Displays help window with About and License information.

DTOs tab

20121119_205358.png
  1. Target: DTOs drop targets available in your Solution. Select the one you want to drop the generated source files for DTOs. It can be a Project or a Project folder.
    1. Note: If the target is missing any reference that is needed it will be automatically added to the project.
  2. Use target default namespace: Indicates if the target default namespace is going to be used for DTOs.
  3. DTOs Service-Ready: Indicates if DTOs must be prepared to be used in a Service as operation parameters and/or operation result. This results in adding DataContract attribute to each DTO class and DataMember attribute to properties of each DTO.
  4. Generate Constructor Methods: Indicates if constructors for DTOs must be generated. If checked, for each DTO it will generate an empty constructor and a constructor with all DTO properties as parameters.
  5. Association: Select how Associations are going to be represented in DTOs.
    1. Key Properties: Use Key Properties in associations.
    2. Class Types: Use Class Types (DTOs) in associations.
  6. Generation Type: Select how to store generated code.
    1. One Source File: Use only one source file containing all DTOs generated code.
    2. Source File per Class: Use one source file per Class (DTO).
    3. Source File name: Shows the source file name that is going to be used. It is enabled if you select "One Source File" option.
  7. Identifier: Select how DTO class names are going to be differentiated from source type class names.
    1. None: Do not differentiate DTO class names.
    2. Prefix: Use "Word" as prefix. This results in "WordSourceTypeClassName".
    3. Suffix: Use "Word" as suffix. This results in "SourceTypeClassNameWord".

Assemblers tab

20121119_205557.png
  1. Target: Assemblers drop targets available in your Solution. Select the one you want to drop the generated source files for Assemblers. It can be a Project or a Project folder.
  2. Generate Assemblers: Indicates if Assemblers must be generated.
  3. Use target default namespace: Indicates if the target default namespace is going to be used for Assemblers.
  4. Generation Type: Select how to store generated code.
    1. One Source File: Use only one source file containing all Assemblers generated code.
    2. Source File per Class: Use one source file per Class (Assembler).
    3. Source File name: Shows the source file name that is going to be used. It is enabled if you select "One Source File" option.
  5. Identifier: Select how Assembler class names are going to be differentiated from source type class names.
    1. None: Do not differentiate Assembler class names.
    2. Prefix: Use "Word" as prefix. This results in "WordSourceTypeClassName".
    3. Suffix: Use "Word" as suffix. This results in "SourceTypeClassNameWord".

General tab

20121119_210114.png
  1. Custom header comment: Indicates if a custom header comment must be placed at the beginning of every source file generated.
    1. Text: The header comment to be used if "Custom header comment" option is checked (do not place /* or */, they are automatically inserted in the generated code).

Options tab

20121119_210149.png
  1. Check for new stable versions: Shows a message when a new stable version is available to download.
  2. Check for new beta versions: Shows a message when a new beta version is available to download.


Last edited Nov 20, 2012 at 12:31 AM by ffernandez, version 11

Comments

kelvin1997 Jun 29, 2015 at 1:42 AM 
Similar problem as johndoetesting123. A bit confused and have no luck to generate and DTOs yet. The UI design could be more user friendly.

johndoetesting123 Jan 15, 2014 at 11:51 AM 
hii
I want to use entitiestodto in my project coded in c#.net.I opened the window but no target projects are visible. what this targets mean? I got the error "Please, select a target for DTOs. Solution is not allowed" on clicking generate button. There are many folders inside my project. But they are not selected as targets.