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 Location
[Serializable]
[ECRUD.NoteSchema("HR")]
[ECRUD.NoteTable("LOCATIONS")]
[ECRUD.PrimaryKey("LOCATION_ID", SequenceType = ECRUD.Enums.SequenceType.Max)]
public class Location
{
    //Column
    [ECRUD.Column("LOCATION_ID")]
    [ECRUD.NoteDataType(ECRUD.Enums.DataTypes.NUMBER)]
    public long? LocationId { get; set; }

    //Column
    [ECRUD.Column("STREET_ADDRESS")]
    [ECRUD.NoteDataType(ECRUD.Enums.DataTypes.VARCHAR2)]
    public string StreetAddress { get; set; }

    //Column
    [ECRUD.Column("POSTAL_CODE")]
    [ECRUD.NoteDataType(ECRUD.Enums.DataTypes.VARCHAR2)]
    public string PostalCode { get; set; }

    //Column
    [ECRUD.Column("CITY")]
    [ECRUD.NoteDataType(ECRUD.Enums.DataTypes.VARCHAR2)]
    public string City { get; set; }

    //Column
    [ECRUD.Column("STATE_PROVINCE")]
    [ECRUD.NoteDataType(ECRUD.Enums.DataTypes.VARCHAR2)]
    public string StateProvince { get; set; }
}
#endregion