Base solution for your next web application

Activities of "rajalla"

I would like to update the user id and email to our business account. It is under an employee that is no longer with our organization

Prerequisites

Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • What is your product version?

Latest as of today

  • What is your product type (Angular or MVC)?

MVC

  • What is product framework type (.net framework or .net core)?

.net core

Error While setting up the devops CI/CD as per the instructions provided in step Generate Migration Scripts.

LOG:

2020-08-25T14:39:27.2517773Z ##[section]Starting: Generate Migration Scripts 2020-08-25T14:39:27.2683784Z ============================================================================== 2020-08-25T14:39:27.2685642Z Task : Entity Framework Core Migrations Script Generator 2020-08-25T14:39:27.2686465Z Description : Tool for projects that use Entity Framework Core Code-First. Generates migration scripts which can be used to update a database (for instance with the task 'Azure SQL Database Deployment'). 2020-08-25T14:39:27.2687131Z Version : 0.0.51 2020-08-25T14:39:27.2687471Z Author : PEK's Productions 2020-08-25T14:39:27.2687951Z Help : More Information 2020-08-25T14:39:27.2688473Z ============================================================================== 2020-08-25T14:39:28.0313933Z Project path: D:\a\1\s\src\ProjectDemo.EntityFrameworkCore\ProjectDemo.EntityFrameworkCore.csproj 2020-08-25T14:39:28.0315403Z Start-up project path: D:\a\1\s\src\MidocsDemo.Web.Mvc\ProjectDemo.Web.Mvc.csproj 2020-08-25T14:39:28.0316394Z Target folder: D:\a\1\a/migrations 2020-08-25T14:39:28.0317108Z Number of database contexts: 1 2020-08-25T14:39:28.0317812Z Checking of dotnet-ef is installed. 2020-08-25T14:39:28.0432560Z [command]"C:\Program Files\dotnet\dotnet.exe" tool list --global 2020-08-25T14:39:28.2692979Z Package Id Version Commands 2020-08-25T14:39:28.2697579Z ------------------------------------- 2020-08-25T14:39:28.2893137Z 2020-08-25T14:39:28.2956875Z Parsing output: "Package Id Version Commands 2020-08-25T14:39:28.2958025Z ------------------------------------- 2020-08-25T14:39:28.2958746Z " 2020-08-25T14:39:28.2959501Z Installing version undefined of dotnet-ef as global tool. 2020-08-25T14:39:28.3065144Z [command]"C:\Program Files\dotnet\dotnet.exe" tool install --global dotnet-ef 2020-08-25T14:39:31.0032882Z You can invoke the tool using the following command: dotnet-ef 2020-08-25T14:39:31.0034693Z Tool 'dotnet-ef' (version '3.1.7') was successfully installed. 2020-08-25T14:39:31.0082521Z 2020-08-25T14:39:31.0203731Z Generating migration script for ProjectDemoDbContext in project D:\a\1\s\src\ProjectDemo.EntityFrameworkCore\MidocsDemo.EntityFrameworkCore.csproj 2020-08-25T14:39:31.0283497Z Default build configuration will be used. 2020-08-25T14:39:31.0284876Z The script will be idempotent. 2020-08-25T14:39:31.0303863Z [command]"C:\Program Files\dotnet\dotnet.exe" ef migrations script --project D:\a\1\s\src\ProjectDemo.EntityFrameworkCore\ProjectDemo.EntityFrameworkCore.csproj --startup-project D:\a\1\s\src\ProjectDemo.Web.Mvc\ProjectDemo.Web.Mvc.csproj --output D:\a\1\a/migrations/ProjectDemoDbContext.sql --context ProjectDemoDbContext --verbose --idempotent 2020-08-25T14:39:31.2083218Z Specify which project file to use because this 'D:\a\1\s' contains more than one project file. 2020-08-25T14:39:31.2102628Z 2020-08-25T14:39:31.2267953Z ##[error]The process 'C:\Program Files\dotnet\dotnet.exe' failed with exit code 1 2020-08-25T14:39:31.2336884Z ##[section]Finishing: Generate Migration Scripts

I am trying to use jtable createAction/updateAction methods to add/update records directly from the table.

actions: {
                                            listAction: {
                                                method: _campaignervice.getImportEmployeeDependants
                                            },
                                            updateAction: {
                                                method: _campaignervice.addUpdateImportListDependant
                                            },
                                            createAction: {
                                                method: _campaignervice.addUpdateImportListDependant
                                                    }

But when the call goes to the application service I noticed the values from the dialog form are not binding to the dto object. After further investigation I found below code from the abp.jtable.js which is being used to call the update method. Adding log statements to the code showed that the data posted from form (postdata) is a querystring and when it is not being converted JSON object properly.

return $.Deferred(function ($dfd) {

                    var input = $.extend({}, postData);
                    console.log(postData);
                    console.log(input);
                    originalUpdateAction.method(input)
                        .done(function (result) {
                            var jtableResult = { "Result": "OK" };
                            if (originalUpdateAction.returnsRecord) {
                                if (originalUpdateAction.recordField) {
                                    jtableResult.Record = result[originalUpdateAction.recordField];
                                } else {
                                    jtableResult.Record = result;
                                }
                            }

                            $dfd.resolve(jtableResult);
                        })
                        .fail(function (error) {
                            self._handlerForFailOnAbpRequest($dfd, error);
                        });
                });

Below is the console log [attachment=1:2bhvrp7r]Log.png[/attachment:2bhvrp7r]

So I tried converting the query string to JSON object as shown in the code below

return $.Deferred(function ($dfd) {

                    var input = $.extend({}, postData);
                    
                    console.log(postData);
                    input = $.parseJSON('{"' + postData.replace(/&/g, '","').replace(/=/g, '":"') + '"}');
                    console.log(input);
                    originalUpdateAction.method(input)
                        .done(function (result) {
                            var jtableResult = { "Result": "OK" };
                            if (originalUpdateAction.returnsRecord) {
                                if (originalUpdateAction.recordField) {
                                    jtableResult.Record = result[originalUpdateAction.recordField];
                                } else {
                                    jtableResult.Record = result;
                                }
                            }

                            $dfd.resolve(jtableResult);
                        })
                        .fail(function (error) {
                            self._handlerForFailOnAbpRequest($dfd, error);
                        });
                });

[attachment=0:2bhvrp7r]Log2.png[/attachment:2bhvrp7r]

And also the dto seems to be binding now. Just wondering why this is happening. Any help is appreciated.

Halil,

Can you let me know how can I consume ABP web api from another application? Do I have to use token based authentication ? Are there any other options ?

Showing 1 to 4 of 4 entries