Documentation Index
Fetch the complete documentation index at: https://docs.amplication.com/llms.txt
Use this file to discover all available pages before exploring further.
Event Name
CreateDTOs
Event Parameters
The entity object for which DTOs are being created.
The name of the DTO class to be created.
The base path where DTO files are generated.
afterCreateDTOs(
context: dotnetTypes.DsgContext,
eventParams: dotnet.CreateDTOsParams,
files: FileMap<Class>
): Promise<FileMap<Class>> {
const { entity, dtoName } = eventParams;
const dtoFile = files.get(`DTOs/${dtoName}.cs`);
if (dtoFile) {
dtoFile.code.addProperty(
CsharpSupport.property({
name: "LastModified",
type: CsharpSupport.Types.dateTime(),
})
);
}
return files;
}