This document describes the PX1028 diagnostic.
Code | Short Description | Type | Code Fix |
---|---|---|---|
PX1028 | Constructors in DACs are prohibited. | Error | Available |
Constructors in DACs are prohibited for the following reasons:
- DACs are the classes that are used to read and write data. Therefore, for appropriate program architecture and design, DACs cannot contain any business logic.
- The system creates the DAC instances by using the default constructor.
The code fix removes the selected constructor from the DAC.
public class POLine : PXBqlTable, IBqlTable
{
public POLine() : base() // The PX1028 error is displayed for this line.
{
}
}
public class POLine : PXBqlTable, IBqlTable
{
}