Job
Example model for ECRUD.
Class documentation
This example uses Oracle HR schema.
Code
Column representation, one-to-one, one-to-many relationships, and all specifications for mapping a table.
#region Job
[Serializable]
[ECRUD.NoteSchema("HR")]
[ECRUD.NoteTable("JOBS")]
[ECRUD.PrimaryKey("JOB_ID", SequenceType = ECRUD.Enums.SequenceType.Max)]
public class Job
{
//Column
[ECRUD.Column("JOB_ID")]
[ECRUD.NoteDataType(ECRUD.Enums.DataTypes.VARCHAR2)]
public string Id { get; set; }
//Column
[ECRUD.Column("JOB_TITLE")]
[ECRUD.NoteDataType(ECRUD.Enums.DataTypes.VARCHAR2)]
public string JobTitle { get; set; }
//Column
[ECRUD.Column("MIN_SALARY")]
[ECRUD.NoteDataType(ECRUD.Enums.DataTypes.NUMBER)]
public long? MinSalary { get; set; }
//Column
[ECRUD.Column("MAX_SALARY")]
[ECRUD.NoteDataType(ECRUD.Enums.DataTypes.NUMBER)]
public long? MaxSalary { get; set; }
}
#endregion