011 First Web Api Service (PhoneType) - chempkovsky/CS82ANGULAR GitHub Wiki
- Run WebApi Wizard
- First page of the Wizard
- Second page of the Wizard
- Third page of the Wizard
- Fourth page of the Wizard
- Fifth page of the Wizard
- Before generating WebApi service the developer must define the set of View’s properties that
- will be used for filtering
- and the set of View’s properties that
- will be used for sorting.
- choose which Webapi methods to generate (Add/Update/Delete/Select One/Select many) for the given view
- To Generate Web Api service
- Run Visual Studio and Open
PhonebookSolution
solution - Right Click
Controllers
of thePhBkControllers
-project and selectWebApiServices 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 View
-
- choose the props to be used for sorting and filtering
-
- choose WebApi methods to generate
-
- if to
generate localized typescript code
-CheckBox usingAngular i18n
- if to
-
- Click
Next
-button
Click to show the picture
- On the Fourth page of the Wizard we choose
DefaultWebApiService.Core.cs.t4
T4-template to generate the code. ClickNext
-button.
- On the Fifth page of the Wizard click
Save
-button. Close the Wizard.
Click to show the picture
The PhbkPhoneTypeViewWebApiController.cs
will be created in the Controllers
-folder of the PhBkWebApp.csproj
-project