-
Notifications
You must be signed in to change notification settings - Fork 0
016 Naming the folders
chempkovsky edited this page Nov 9, 2022
·
17 revisions
- Run JavaScripts Wizard
- First page of the Wizard
- Second page of the Wizard
- Third page of the Wizard
- Fourth page of the Wizard
- Create subfolders
- View (or ModelView) is the structure that the WebApi service sends to and receives from the client. For each entity, the developer must create at least one view.
- View (or ModelView) is a Data Transfer Objects (DTO)
- For a given entity, the View (or ModelView) is a subset of the properties of the given entity and a subset of the properties of the direct and indirect master entities (in terms of the master-detail relationship).
- From the point of view of Sql constructions, for a given entity (table) View (or ModelView) is an sql View.
- According to the agreement specified in the article 015 Preparing projects for application launch, we will generate Angular components and services in the folders
src/app/components
src/app/services
- before generating Angular typescript classes for each
ModelView
we need to create subfolders for them. This article is devoted to the simple method of naming such a folders.
- To name the folder
- Run Visual Studio and Open
PhonebookSolution
solution - Right Click
app
of thesrc
-project (Angular project) and selectJavaScripts Wizard
menu item to open the Wizard dialog
- Run Visual Studio and Open
Click to show the picture
- On the first page of the dialog the destination folder is shown. The destination folder is the folder in which the generated file will be created. Click
Next
-button
Click to show the picture
- On the second page of the Wizard we select DbContext that will be used to choose the entity for the View. Select PhBkContext.csproj and the PhBkContext class using the drop-down lists. Click
Next
-button.
Click to show the picture
- On the third page of the Wizard
- select the View for which we need to get the name
- in the picture below we have selected
PhbkPhoneTypeView
-View
- in the picture below we have selected
- select the View for which we need to get the name
- Click
Next
-button
Click to show the picture
- On the Fourth page of the Wizard we choose
01100-.interface.ts
action type.- in the
enter file name
-edit-box you will get the name in the formxxxxxxxx.interface
- in the
Click to show the picture
- copy generated name without the
.interface
-suffix. It can used as a name of the folders.- in the picture above we have selected
phbk-phone-type-view
-name
- in the picture above we have selected
- Having the name gotten on the fourth page of the Wizard we create two subfolder:
src/app/components/xxxxxxxx
src/app/services/xxxxxxxx
- in the picture below we have created
src/app/components/phbk-phone-type-view
src/app/services/phbk-phone-type-view