Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 1.04 KB

PX1028.md

File metadata and controls

38 lines (28 loc) · 1.04 KB

PX1028

This document describes the PX1028 diagnostic.

Summary

Code Short Description Type Code Fix
PX1028 Constructors in DACs are prohibited. Error Available

Diagnostic Description

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.

Example of Incorrect Code

public class POLine : PXBqlTable, IBqlTable
{
    public POLine() : base() // The PX1028 error is displayed for this line.
    {
    }
}

Example of Code Fix

public class POLine : PXBqlTable, IBqlTable
{
}

Related Articles

Data Access Classes