Fix problems on the blazor ui PR

pull/5399/head
Halil İbrahim Kalkan 5 years ago
parent fbe14bfb01
commit d85f96a289

@ -26,44 +26,26 @@ dotnet tool update -g Volo.Abp.Cli
> If you've created your project with version 3.1 or later, you can skip this part since it will be already installed in your solution. > If you've created your project with version 3.1 or later, you can skip this part since it will be already installed in your solution.
<<<<<<< HEAD
For the solution was created before v3.1, follow the steps below to configure your angular project:
* Add `@abp/ng.schematics` package to the `devDependencies` of the Angular project (run the following command in the root folder of the angular application):
=======
For a solution that was created before v3.1, follow the steps below to configure the angular application: For a solution that was created before v3.1, follow the steps below to configure the angular application:
* Add `@abp/ng.schematics` package to the `devDependencies` of the Angular project. Run the following command in the root folder of the angular application: * Add `@abp/ng.schematics` package to the `devDependencies` of the Angular project. Run the following command in the root folder of the angular application:
>>>>>>> dev
````bash ````bash
npm install @abp/ng.schematics --save-dev npm install @abp/ng.schematics --save-dev
```` ````
<<<<<<< HEAD
- Add `rootNamespace` entry into the `/apis/default/` section in the `/src/environments/environment.ts`, as shown below:
=======
- Add `rootNamespace` entry into the `apis/default` section in the `/src/environments/environment.ts`, as shown below: - Add `rootNamespace` entry into the `apis/default` section in the `/src/environments/environment.ts`, as shown below:
>>>>>>> dev
```json ```json
apis: { apis: {
default: { default: {
... ...
<<<<<<< HEAD
rootNamespace: 'Acme.BookStore' //<-- ADD THIS
=======
rootNamespace: 'Acme.BookStore' rootNamespace: 'Acme.BookStore'
>>>>>>> dev
}, },
} }
``` ```
<<<<<<< HEAD
`Acme.BookStore` should be replaced by the root namespace of your .NET project. This ensures to not create unnecessary nested folders while creating the service proxy code.
=======
`Acme.BookStore` should be replaced by the root namespace of your .NET project. This ensures to not create unnecessary nested folders while creating the service proxy code. This value is `AngularProxyDemo` for the example solution explained below. `Acme.BookStore` should be replaced by the root namespace of your .NET project. This ensures to not create unnecessary nested folders while creating the service proxy code. This value is `AngularProxyDemo` for the example solution explained below.
>>>>>>> dev
* Finally, add the following paths to the `tsconfig.base.json` to have a shortcut while importing proxies: * Finally, add the following paths to the `tsconfig.base.json` to have a shortcut while importing proxies:
@ -78,15 +60,9 @@ apis: {
### Project Creation ### Project Creation
<<<<<<< HEAD
Assuming you've created your project with the Angular UI.
Example (using the [ABP CLI](https://docs.abp.io/en/abp/latest/CLI)):
=======
> If you already have a solution, you can skip this section. > If you already have a solution, you can skip this section.
You need to [create](https://abp.io/get-started) your solution with the Angular UI. You can use the [ABP CLI](https://docs.abp.io/en/abp/latest/CLI) to create a new solution: You need to [create](https://abp.io/get-started) your solution with the Angular UI. You can use the [ABP CLI](https://docs.abp.io/en/abp/latest/CLI) to create a new solution:
>>>>>>> dev
````bash ````bash
abp new AngularProxyDemo -u angular abp new AngularProxyDemo -u angular
@ -96,11 +72,7 @@ abp new AngularProxyDemo -u angular
The backend application must be up and running to be able to use the service proxy code generation system. The backend application must be up and running to be able to use the service proxy code generation system.
<<<<<<< HEAD
> See the [getting started](https://docs.abp.io/en/abp/latest/Getting-Started?UI=NG&DB=EF&Tiered=No) guide if you don't know how create and to run the project.
=======
> See the [getting started](https://docs.abp.io/en/abp/latest/Getting-Started?UI=NG&DB=EF&Tiered=No) guide if you don't know details of creating and running the solution. > See the [getting started](https://docs.abp.io/en/abp/latest/Getting-Started?UI=NG&DB=EF&Tiered=No) guide if you don't know details of creating and running the solution.
>>>>>>> dev
### Backend ### Backend
@ -161,21 +133,13 @@ It simply returns a list of books. You probably want to get the books from a dat
### HTTP API ### HTTP API
<<<<<<< HEAD
Thanks to the conventional API controllers system of the ABP Framework, we don't have too develop API controllers manually. Just **run the backend (*HttpApi.Host*) application** that shows the [Swagger UI](https://swagger.io/tools/swagger-ui/) by default. You will see the GET API for the books:
=======
Thanks to the [auto API controllers](https://docs.abp.io/en/abp/latest/API/Auto-API-Controllers) system of the ABP Framework, we don't have to develop API controllers manually. Just **run the backend (*HttpApi.Host*) application** that shows the [Swagger UI](https://swagger.io/tools/swagger-ui/) by default. You will see the **GET** API for the books: Thanks to the [auto API controllers](https://docs.abp.io/en/abp/latest/API/Auto-API-Controllers) system of the ABP Framework, we don't have to develop API controllers manually. Just **run the backend (*HttpApi.Host*) application** that shows the [Swagger UI](https://swagger.io/tools/swagger-ui/) by default. You will see the **GET** API for the books:
>>>>>>> dev
![swagger-book-list](swagger-book-list.png) ![swagger-book-list](swagger-book-list.png)
### Service Proxy Generation ### Service Proxy Generation
<<<<<<< HEAD
Open a command line in the root folder of the Angular application and execute the following command:
=======
Open a **command line** in the **root folder of the Angular application** and execute the following command: Open a **command line** in the **root folder of the Angular application** and execute the following command:
>>>>>>> dev
````bash ````bash
abp generate-proxy abp generate-proxy

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> <Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait /> <ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers> </Weavers>

@ -18,10 +18,6 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Volo.Abp.AspNetCore.Mvc.Client.Common\Volo.Abp.AspNetCore.Mvc.Client.Common.csproj" /> <ProjectReference Include="..\Volo.Abp.AspNetCore.Mvc.Client.Common\Volo.Abp.AspNetCore.Mvc.Client.Common.csproj" />
<ProjectReference Include="..\Volo.Abp.AspNetCore.Mvc.Contracts\Volo.Abp.AspNetCore.Mvc.Contracts.csproj" />
<ProjectReference Include="..\Volo.Abp.Caching\Volo.Abp.Caching.csproj" />
<ProjectReference Include="..\Volo.Abp.Http.Client\Volo.Abp.Http.Client.csproj" />
<ProjectReference Include="..\Volo.Abp.Localization\Volo.Abp.Localization.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

@ -187,10 +187,15 @@ namespace Volo.Abp.BlazoriseUI
{ {
var entityDto = await AppService.GetAsync(id); var entityDto = await AppService.GetAsync(id);
EditingEntityId = id; EditingEntityId = id;
EditingEntity = ObjectMapper.Map<TGetOutputDto, TUpdateInput>(entityDto); EditingEntity = MapToEditingEntity(entityDto);
EditModal.Show(); EditModal.Show();
} }
protected virtual TUpdateInput MapToEditingEntity(TGetOutputDto entityDto)
{
return ObjectMapper.Map<TGetOutputDto, TUpdateInput>(entityDto);
}
protected virtual Task CloseEditModalAsync() protected virtual Task CloseEditModalAsync()
{ {
EditModal.Hide(); EditModal.Hide();

@ -1,6 +1,6 @@
{ {
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=localhost;Database=MyProjectName_Free;Trusted_Connection=True;MultipleActiveResultSets=true" "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True;MultipleActiveResultSets=true"
}, },
"IdentityServer": { "IdentityServer": {
"Clients": { "Clients": {

@ -3,7 +3,7 @@
"CorsOrigins": "https://*.MyProjectName.com,http://localhost:4200" "CorsOrigins": "https://*.MyProjectName.com,http://localhost:4200"
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=localhost;Database=MyProjectName_Free;Trusted_Connection=True;MultipleActiveResultSets=true" "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True;MultipleActiveResultSets=true"
}, },
"Redis": { "Redis": {
"Configuration": "127.0.0.1" "Configuration": "127.0.0.1"

@ -4,7 +4,7 @@
"CorsOrigins": "https://*.MyProjectName.com,http://localhost:4200,https://localhost:44307" "CorsOrigins": "https://*.MyProjectName.com,http://localhost:4200,https://localhost:44307"
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=localhost;Database=MyProjectName_Free;Trusted_Connection=True;MultipleActiveResultSets=true" "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True;MultipleActiveResultSets=true"
}, },
"AuthServer": { "AuthServer": {
"Authority": "https://localhost:44305" "Authority": "https://localhost:44305"

@ -4,7 +4,7 @@
"CorsOrigins": "https://*.MyProjectName.com,http://localhost:4200,https://localhost:44307" "CorsOrigins": "https://*.MyProjectName.com,http://localhost:4200,https://localhost:44307"
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=localhost;Database=MyProjectName_Free;Trusted_Connection=True;MultipleActiveResultSets=true" "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True;MultipleActiveResultSets=true"
}, },
"Redis": { "Redis": {
"Configuration": "127.0.0.1" "Configuration": "127.0.0.1"

@ -3,7 +3,7 @@
"SelfUrl": "https://localhost:44303" "SelfUrl": "https://localhost:44303"
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=localhost;Database=MyProjectName_Free;Trusted_Connection=True;MultipleActiveResultSets=true" "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True;MultipleActiveResultSets=true"
}, },
"AuthServer": { "AuthServer": {
"Authority": "https://localhost:44303" "Authority": "https://localhost:44303"

Loading…
Cancel
Save