Hi i try to create update function for PbPerson problem is when i update the fields [CreatorUserId] and [TenantId] become null data the data i have change also not update to the DB
Id CreationTime CreatorUserId DeleterUserId DeletionTime EmailAddress IsDeleted LastModificationTime LastModifierUserId Name Surname TenantId
53 2017-07-31 22:18:12.1840917 2 2 2017-07-31 22:20:10.8563334 NULL 1 NULL NULL a b 1
54 2017-07-31 22:27:05.3251989 NULL NULL NULL NULL 0 2017-07-31 22:27:05.3261990 NULL a a 0
55 2017-07-31 22:30:47.0648198 NULL NULL NULL NULL 0 2017-07-31 22:30:47.0658199 NULL a a 0
58 2017-07-31 22:36:52.3516411 NULL NULL NULL NULL 0 2017-07-31 22:36:52.3566414 NULL a c 0
i have create class:
[AutoMapTo(typeof(Person))]
public class CreateOrUpdatePersonInput
{
public int? Id { get; set; }
[Required]
[MaxLength(Person.MaxNameLength)]
public string Name { get; set; }
[Required]
[MaxLength(Person.MaxSurnameLength)]
public string Surname { get; set; }
[EmailAddress]
[MaxLength(Person.MaxEmailAddressLength)]
public string EmailAddress { get; set; }
}
and on the service
public async Task CreatePerson(CreateOrUpdatePersonInput input)//(CreatePersonInput input)
{
var person = ObjectMapper.Map<Person>(input);
await _personRepository.InsertOrUpdateAsync(person);
}
Thank you
Hi My version: ASP.NET CORE + ANGULAR 4.X i try to follow the sample on: <a class="postlink" href="https://aspnetzero.com/Documents/Extending-Existing-Entities#extending-non-abstract-entities">https://aspnetzero.com/Documents/Extend ... t-entities</a>
Up and Down not show detail
using Abp.Application.Editions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KWANP.Editions
{
public class MyEdition : Edition
{
public virtual int Price { get; set; }
}
}
Re build my project and
PM> Add-Migration "Added_MyEdition_Entity"
To undo this action, use Remove-Migration.
Then the result not same with sample
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
namespace KWANP.Migrations
{
public partial class Added_MyEdition_Entity : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
}
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}
Thank you
Hi
it is possible when i click the left menu and then call .exe program with pass parameters to my Drive C:\
i follow the help from internet
function executeCommands(inputparms)
{
var oShell = new ActiveXObject("Shell.Application");
var commandtoRun = "C:\\WINDOWS\\Notepad.exe";
if (inputparms != "")
{
var commandParms = document.Form1.filename.value;
}
oShell.ShellExecute(commandtoRun, commandParms, "", "open", "1");
}
it not working
Thank you
Hi this link is very helpful: <a class="postlink" href="https://www.aspnetzero.com/Documents/Extending-Existing-Entities#extending-non-abstract-entities">https://www.aspnetzero.com/Documents/Ex ... t-entities</a>
but i have the problem when extending AbpOrganizationUnits table
public class OrgChartExtend : OrganizationUnit
{
public virtual string DisplayCode { get; set; }
}
public partial class Added_DisplayCode_To_OrganizationUnit : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn< string > (name: "DisplayCode", table: "dbo.AbpOrganizationUnits", nullable: true, maxLength: 50);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(name: "DisplayCode", table: "dbo.AbpOrganizationUnits");
}
}
and when i update this to the database error show this
PM> Update-Database
Executed DbCommand (35ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT OBJECT_ID(N'__EFMigrationsHistory');
Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT OBJECT_ID(N'__EFMigrationsHistory');
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT [MigrationId], [ProductVersion]
FROM [__EFMigrationsHistory]
ORDER BY [MigrationId];
Applying migration '20170625042330_Added_DisplayCode_To_OrganizationUnit'.
Executed DbCommand (6ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
ALTER TABLE [dbo.AbpOrganizationUnits] ADD [DisplayCode] nvarchar(50);
System.Data.SqlClient.SqlException (0x80131904): Cannot find the object "dbo.AbpOrganizationUnits" because it does not exist or you do not have permissions.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, String executeMethod, IReadOnlyDictionary`2 parameterValues, Boolean closeConnection)
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
at Microsoft.EntityFrameworkCore.Migrations.MigrationCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQuery(IEnumerable`1 migrationCommands, IRelationalConnection connection)
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String targetMigration)
at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.UpdateDatabase(String targetMigration, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabaseImpl(String targetMigration, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabase.<>c__DisplayClass0_1.<.ctor>b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
ClientConnectionId:74ac8c62-7c3f-4b38-9db1-246f2ccfc65f
Error Number:4902,State:1,Class:16
Cannot find the object "dbo.AbpOrganizationUnits" because it does not exist or you do not have permissions.
Thank you
I have problem when publish angular to IIS and i try to find the solution on ASP.NET Boilerplate official forum but cannot find the answer
On the Server side i already fix the problem, solution i got it from the forum
For Client side after i publish and open the page just spinning with the error cannot find the server
appconfig.json
{
"remoteServiceBaseUrl": "http://localhost:22742",
"appBaseUrl": "http://localhost:4200"
}
web.config on dist folder
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Angular Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_URI}" pattern="^/(api)" negate="true" />
</conditions>
<action type="Rewrite" url="/" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Thank you
Hi i am using version of Asp.net core with Angular
i modify the project follow from this link <a class="postlink" href="https://www.aspnetzero.com/Documents/Merge-Angular-Client-Server">https://www.aspnetzero.com/Documents/Me ... ent-Server</a> and after i publish the website with VS2017 this error is show up "Severity Code Description Project File Line Suppression State Error The command "robocopy C:\Mahachula\TestMerge\KWANP\aspnet-core\src\KWANP.Web.Host\wwwroot\dist\ C:\Mahachula\TestMerge\KWANP\aspnet-core\src\KWANP.Web.Host\wwwroot\ /S /E /MOVE" exited with code 3. KWANP.Web.Host C:\Mahachula\TestMerge\KWANP\aspnet-core\src\KWANP.Web.Host\KWANP.Web.Host.csproj 5 "
and i already try create the dist folder but still error
Thank you