public class Candidate
{
public int RegNo { get; set; }
public string CName { get; set; }
public string Gender { get; set; }
public double Height { get; set;
public DateTime BirthDate { get; set; }
public string Race { get; set; }
public bool Clearance { get; set; }
public string PicFile { get; set; }
}
CREATE TABLE Candidate (
RegNo INT PRIMARY KEY,
CName VARCHAR(50) NOT NULL,
Gender CHAR NOT NULL,
Height FLOAT NOT NULL,
BirthDate DATE NOT NULL,
Race VARCHAR(5) NOT NULL,
Clearance BIT NOT NULL,
PicFile VARCHAR(30) NOT NULL
);
Note: After you have created the class, you must consider nullability, and modify the class accordingly.
E.g., public string CName { get; set; } = null!;