Hello ANZ Team,
I downloaded a vanilla copy of my project using the latest version from my account with a project in ASP.NET Core and Angular v8.4 but for some reason when I tried to add an entity using the RAD Tool and option to track entity history is no longer allowing me to check the box. It says my project does not support it? Attached is a screenshot.
Please advise.
Thank you!
Thank you @maliming
Thank you @maliming. Is this something that automatically sets the expiration of the audit logs or is there a configuration that we need to set to tell the system when the logs get expired? How long is the default age when the logs get deleted?
Hello ANZ Team,
I would like to understand how to enable this new feature in 8,2?
Please advise. Thank you.
Understood. Thank you @ismcagdas
Hello ANZ Team,
I would like to seek guidance if there is a common approach in creating static data like in the Roles management. I would like to implement the same thing to my other entities and was wondering if there are built-in functions already that I can inherit from or do you have some sort of documentation that I can follow?
Thank you!
Thanks for the suggestion @maliming
Hello @malimig,
I tried to implement the one in the related discussions but I also wanted to see if it is achievable via migration so I can also use the Migrator tool and have a single codebase. Anyway here is the migration file content as requested.
using Microsoft.EntityFrameworkCore.Migrations;
namespace LogDesk.Migrations
{
public partial class Seed_Countries_Entity : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql("INSERT INTO [dbo].[Countries] ([Code], [Description], [IsEuro], [CurrencyCode], [CurrencyDescription], [CurrencySymbol], [Inactive], [CreationTime], [IsDeleted]) VALUES ('GB', 'United Kingdom', 0, 'GBP', 'United Kingdom Pounds', '£', 0, GETDATE(), 0)");
migrationBuilder.Sql("INSERT INTO [dbo].[Countries] ([Code], [Description], [IsEuro], [CurrencyCode], [CurrencyDescription], [CurrencySymbol], [Inactive], [CreationTime], [IsDeleted]) VALUES ('US', 'United States of America', 0, 'USD', 'United States Dollars', '$', 0, GETDATE(), 0)");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql("DELETE FROM [dbo].[Countries]");
}
}
}
Notice that I am not assigning a TenantId
value to the SQL statement since I don't know how to get it when applying the migration across the tenants.
Hello ANZ Team,
I am trying to seed my table using migration and it is working well when applying the migration across multiple tenants with their own separate database. The issue I have though is that the TenantId column is NULL in the separate database. I would like to ask how I can resolve this issue since I cannot see in the migrationBuilder class a property to get the TenantId when the Migrator runs it.
Please advise.
Thank you!