V5 to Vnext
BIA Framework Migration
- Delete from your Angular projects all package-lock.json and node_modules folder
- Use the BIAToolKit to migrate the project :
- Run it automatically by clicking on Migrate button
or - Execute each step manually until step 3 - Apply Diff
- Run it automatically by clicking on Migrate button
- Mind to check the output logs to check any errors or missing deleted files
- Manage the conflicts (two solutions) :
- Merging rejected files
- Execute step 4 - Merge Rejected (already executed with automatic migration)
- Search
<<<<<in all files - Resolve the conflicts
- Analyzing rejected files - MANUAL MIGRATION ONLY
- Analyze all the
.rejfiles (search "diff a/" in VS code) - Apply manually the changes into your files
- Analyze all the
tipUse the conflict resolution chapter to help you
- Merging rejected files
- For each Angular project, launch the npm install and npm audit fix command
- Download the migration script
- Change source path of the migration script to target your project root and your Angular project
- Run it for each of your Angular project (change the Angular source path each time)
- Apply other manual steps for Front (for each Angular project) and Back
- Resolve missing and obsolete usings in back-end with BIAToolKit (step 6 - Resolve Usings)
- Resolve building issues into your Angular projects and back end
- If all is ok, you can remove the
.rejfiles. During the process they can be useful to resolve build problems - Execute the database migration instructions
- For each Angular project, launch the
npm run cleancommand - Clean back-end solution
Conflict Resolution
AuditFeature
Into AuditTypeMapper method, integrate your old switch case conditions into the new one :
public override Type AuditTypeMapper(Type type)
{
switch(type.Name)
{
case "MyEntity":
return typeof(MyEntityAudit);
default:
return base.AuditTypeMapper(type);
}
}
public override Type AuditTypeMapper(Type type)
{
return type.Name switch
{
// Your previous mapping here
nameof(MyEntity) => typeof(MyEntityAudit),
// BIAToolKit - Begin AuditTypeMapper
// BIAToolKit - End AuditTypeMapper
nameof(User) => typeof(UserAudit),
_ => base.AuditTypeMapper(type),
};
}
Front Manual Steps
Full code Index Component
For your full code feature-index.component.html, you will have to add into the .ts the following method :
onViewNameChange(viewName: string | null) {}
Or, you can simply remove from the .html the following binding : (viewNameChange)="onViewNameChange($event)"
Team Configuration
Automatically handled by migration script, for information purpose and manual adjustement only.
From the file all-environments.ts, move the content of your teams configuration into back-end file TeamConfig.cs :
export const allEnvironments = {
teams: [
{
teamTypeId: TeamTypeId.MyTeam,
// Configuration to move below
roleMode: RoleMode.AllRoles,
inHeader: true,
displayOne: false,
displayAlways: false,
teamSelectionCanBeEmpty: false,
label: 'myTeam.headerLabel',
},
]
}
public static class TeamConfig
{
public static readonly ImmutableList<BiaTeamConfig<BaseEntityTeam>> Config = new ImmutableListBuilder<BiaTeamConfig<BaseEntityTeam>>()
{
new BiaTeamConfig<BaseEntityTeam>()
{
TeamTypeId = (int)TeamTypeId.MyTeam,
RightPrefix = "MyTeam",
AdminRoleIds = [(int)RoleId.MyTeamAdmin],
TeamAutomaticSelectionMode = BIA.Net.Core.Common.Enum.TeamSelectionMode.None,
// Configuration from TS
RoleMode = BIA.Net.Core.Common.Enum.RoleMode.AllRoles,
DisplayInHeader = true,
DisplayOne = false,
DisplayAlways = false,
TeamSelectionCanBeEmpty = false
Label = "myTeam.headerLabel",
},
}
}
Then, remove the teams from all-environments.ts
Back Manual Steps
Audit Entities
For all your previous audit entities inherited from AuditEntity :
- inherits from
AuditKeyedEntity<TEntity, TEntityKey, TAuditKey>for audited entities with single PK - inherits from
AuditEntity<TEntity, TAuditKey>for audited join entities with composite PK
See Audit documentation for dedicated audit tables.
Database Migration
You must create a new database migration in order to update the audit entities and the AuditLogs table scheme :
add-migration MigrationV6_AuditEntitiesSchemeUpdate -c datacontextupdate-database -context datacontext