Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "mahendra"

Hi musa.demir,

Thanks for your response.

**Have you removed all the migration and generated the new Migration ? **

Note : We are facing this issue only for the foregin key column. I tried again and facing same issue.

Table Class where added the column OEEnumNotificationStatusId

[Table("OESolutionProcessLink")]
public class OESolutionProcessLink : Entity
{

    public virtual int OESolutionId { get; set; }

    [ForeignKey("OESolutionId")]
    public OESolution OESolutionFk { get; set; }

    public virtual int OEProcessId { get; set; }

    [ForeignKey("OEProcessId")]
    public OEProcess OEProcessFk { get; set; }

    public virtual int? OEEnumNotificationStatus​Id { get; set; }

    [ForeignKey("OEEnumNotificationStatus​Id​")]
    public OEEnumMaster OEEnumNotificationStatus​Fk { get; set; } 

}

Following Migration is Generated When i Change the Encoding to ANSI, i noticed that there are some special characters in the migration for the column OEEnumNotificationStatusId namespace OneEnterprise.iHUB.Migrations { public partial class addedIssueColumn : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn<int>( name: "OEEnumNotificationStatusId", table: "OESolutionProcessLink", nullable: true);

        migrationBuilder.AddColumn&lt;int&gt;(
            name: "OEEnumNotificationStatus​Id​",
            table: "OESolutionProcessLink",
            nullable: true);

        migrationBuilder.CreateIndex(
            name: "IX_OESolutionProcessLink_OEEnumNotificationStatus​Id​",
            table: "OESolutionProcessLink",
            column: "OEEnumNotificationStatus​Id​");

        migrationBuilder.AddForeignKey(
            name: "FK_OESolutionProcessLink_OEEnumMaster_OEEnumNotificationStatus~",
            table: "OESolutionProcessLink",
            column: "OEEnumNotificationStatus​Id​",
            principalTable: "OEEnumMaster",
            principalColumn: "Id",
            onDelete: ReferentialAction.Restrict);
    }

    protected override void Down(MigrationBuilder migrationBuilder)
    {
        migrationBuilder.DropForeignKey(
            name: "FK_OESolutionProcessLink_OEEnumMaster_OEEnumNotificationStatus~",
            table: "OESolutionProcessLink");

        migrationBuilder.DropIndex(
            name: "IX_OESolutionProcessLink_OEEnumNotificationStatus​Id​",
            table: "OESolutionProcessLink");

        migrationBuilder.DropColumn(
            name: "OEEnumNotificationStatusId",
            table: "OESolutionProcessLink");

        migrationBuilder.DropColumn(
            name: "OEEnumNotificationStatus​Id​",
            table: "OESolutionProcessLink");
    }
}

}

ok.Thanks for your help

Hi ismcagdas,

Thanks for your response.

Out of the two approaches you shared, the first one makes sense to me.

I would like to implement the interface as it is explained in the shared link and instead of saving the log in mongo db, I would like to save the data in ASP.NET Zero database in my own custom OEAuditLog table. This way I will try to achieve saving all the log in single repository.

Let me know your thoughts also, do you think it's feasible?

I also would like to ask you. If you have similar example with the SQL Server.

Thanks, Best Regards

Thanks for your quick response.

We are able to create the new field in AbpAuditLogs table. One thing I have noticed that it also creates one extra field "Discriminator".

We are not able to save the record using auditingHelper.SaveAsync(auditInfo) as it takes the parameter AuditInfo and AuditInfo does not have the Newly added fields. Could you please let us know how can we save the new record (with new fields) through auditingHelper.SaveAsync method.

Although, we have successfully inserted the record in Auditlog using the IRepository<OEAuditLog, long> auditLogRepository, with the Additional field which we have created in AbpAuditLogs table. Please see the below screenshot for your reference.

Now when we are fetching the records using the repository IRepository<AuditLog, long> auditLogRepository, we are getting all the records. However, we are not getting the new fields/value which we have added in this table. Please see the below screenshot for your reference.

.

If we are fetching the records using the repository IRepository<OEAuditLog, long> auditLogRepository, we are getting only the records which we have inserted using the IRepository<OEAuditLog, long> auditLogRepository. We are not getting all the AbpAuditLog Table records.

Could you please help us, how can we get the all the records with new fields data.

Best Regards

Hi Expert,

Any update for us. Looking forward to hear from you soon. We are stuck due to this issue.

Thanks Ashish

Hi ismcagdas,

Thansks for your reply.

As per the first link we can see the User.cs in the visual studio solution explorer and we can add the fields in AbpUsers table. However, we are unable to find the entity (i.e class) in the visual studio solution explorer for AbpAuditLogs Table.

Could you please help us how can we add new column in AbpAuditLogs Table.

Any help would be much appreciated.

Thanks,

Hi Expert , I have shared the zip in given in the following mailId ([email protected]). Any help will be much appreciated. Waiting for your response.

Thanks Ashish

Hi Expert,

I have shared the zip in given in your given mail. Looking forward for help from you .

Thanks Ashish Mohan

HI ismcagdas ,

I am unable to send the attachment in this due to following reason. Please let me know other email address or URL where i can attach the zip. I tried to send the mail from my gmail account as well as office email account. But not able to send the mail.

Thanks Ashish Mohan

Hi ismcagdas ,

Still Column with same column is Created, we are not getting any issue. I think remove column from the migration is not a good idea.

Thanks Ashish

Showing 41 to 50 of 123 entries