From d85f96a289285946deafd9cee167bb7449f74cbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Tue, 15 Sep 2020 10:38:06 +0300 Subject: [PATCH] Fix problems on the blazor ui PR --- .../POST.md | 36 ------------------- .../FodyWeavers.xml | 2 +- .../Volo.Abp.AspNetCore.Mvc.Client.csproj | 4 --- .../Abp/BlazoriseUI/BlazoriseCrudPageBase.cs | 7 +++- .../appsettings.json | 2 +- .../appsettings.json | 2 +- .../appsettings.json | 2 +- .../appsettings.json | 2 +- .../appsettings.json | 2 +- 9 files changed, 12 insertions(+), 47 deletions(-) diff --git a/docs/en/Blog-Posts/2020-09-07 Angular-Service-Proxies/POST.md b/docs/en/Blog-Posts/2020-09-07 Angular-Service-Proxies/POST.md index 5c8f61af9b..09df3a2119 100644 --- a/docs/en/Blog-Posts/2020-09-07 Angular-Service-Proxies/POST.md +++ b/docs/en/Blog-Posts/2020-09-07 Angular-Service-Proxies/POST.md @@ -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. -<<<<<<< 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: * 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 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: ->>>>>>> dev ```json apis: { default: { ... -<<<<<<< HEAD - rootNamespace: 'Acme.BookStore' //<-- ADD THIS -======= 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. ->>>>>>> dev * Finally, add the following paths to the `tsconfig.base.json` to have a shortcut while importing proxies: @@ -78,15 +60,9 @@ apis: { ### 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. 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 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. -<<<<<<< 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. ->>>>>>> dev ### Backend @@ -161,21 +133,13 @@ It simply returns a list of books. You probably want to get the books from a dat ### 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: ->>>>>>> dev ![swagger-book-list](swagger-book-list.png) ### 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: ->>>>>>> dev ````bash abp generate-proxy diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/FodyWeavers.xml b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/FodyWeavers.xml index 00e1d9a1c1..be0de3a908 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/FodyWeavers.xml +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/FodyWeavers.xml @@ -1,3 +1,3 @@  - + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo.Abp.AspNetCore.Mvc.Client.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo.Abp.AspNetCore.Mvc.Client.csproj index 27e4f70973..aa11e602a1 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo.Abp.AspNetCore.Mvc.Client.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo.Abp.AspNetCore.Mvc.Client.csproj @@ -18,10 +18,6 @@ - - - - diff --git a/framework/src/Volo.Abp.BlazoriseUI/Volo/Abp/BlazoriseUI/BlazoriseCrudPageBase.cs b/framework/src/Volo.Abp.BlazoriseUI/Volo/Abp/BlazoriseUI/BlazoriseCrudPageBase.cs index a1065d177d..5889737745 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Volo/Abp/BlazoriseUI/BlazoriseCrudPageBase.cs +++ b/framework/src/Volo.Abp.BlazoriseUI/Volo/Abp/BlazoriseUI/BlazoriseCrudPageBase.cs @@ -187,10 +187,15 @@ namespace Volo.Abp.BlazoriseUI { var entityDto = await AppService.GetAsync(id); EditingEntityId = id; - EditingEntity = ObjectMapper.Map(entityDto); + EditingEntity = MapToEditingEntity(entityDto); EditModal.Show(); } + protected virtual TUpdateInput MapToEditingEntity(TGetOutputDto entityDto) + { + return ObjectMapper.Map(entityDto); + } + protected virtual Task CloseEditModalAsync() { EditModal.Hide(); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/appsettings.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/appsettings.json index 0aea1f25cd..0accabeaaa 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/appsettings.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/appsettings.json @@ -1,6 +1,6 @@ { "ConnectionStrings": { - "Default": "Server=localhost;Database=MyProjectName_Free;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True;MultipleActiveResultSets=true" }, "IdentityServer": { "Clients": { diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/appsettings.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/appsettings.json index a4db4e3cd0..3ffc7c4c18 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/appsettings.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/appsettings.json @@ -3,7 +3,7 @@ "CorsOrigins": "https://*.MyProjectName.com,http://localhost:4200" }, "ConnectionStrings": { - "Default": "Server=localhost;Database=MyProjectName_Free;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True;MultipleActiveResultSets=true" }, "Redis": { "Configuration": "127.0.0.1" diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/appsettings.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/appsettings.json index 80346387e4..d71ef4ef79 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/appsettings.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/appsettings.json @@ -4,7 +4,7 @@ "CorsOrigins": "https://*.MyProjectName.com,http://localhost:4200,https://localhost:44307" }, "ConnectionStrings": { - "Default": "Server=localhost;Database=MyProjectName_Free;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True;MultipleActiveResultSets=true" }, "AuthServer": { "Authority": "https://localhost:44305" diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/appsettings.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/appsettings.json index 4dafd4c0b3..887908f3db 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/appsettings.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/appsettings.json @@ -4,7 +4,7 @@ "CorsOrigins": "https://*.MyProjectName.com,http://localhost:4200,https://localhost:44307" }, "ConnectionStrings": { - "Default": "Server=localhost;Database=MyProjectName_Free;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True;MultipleActiveResultSets=true" }, "Redis": { "Configuration": "127.0.0.1" diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/appsettings.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/appsettings.json index fd5ace447a..6cfe8948fa 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/appsettings.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/appsettings.json @@ -3,7 +3,7 @@ "SelfUrl": "https://localhost:44303" }, "ConnectionStrings": { - "Default": "Server=localhost;Database=MyProjectName_Free;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True;MultipleActiveResultSets=true" }, "AuthServer": { "Authority": "https://localhost:44303"