I am moving the old ASP application to the modern version of .NET to reduce the development time that we are considering in the .NET 4.0 Entity Framework. However, we seem to have encountered a brick wall in our development with this problem.
Given a small part of our database: OBJECT table, which contains a list of cars and their corresponding properties. We also have a table OBJECT_OPTIONS, which contains for this vehicle in OBJECT a list of OPTIONS, ACCESSORIES and STANDARD EQUIPMENT. These three types have the same fields and are stored in the same table. The ncopt_type column is used to distinguish between different lists. Possible values ββare "opt", "acc" and "sta". The OBJECT_OPTIONS table refers to OBJECT through ncopt_obj_id, which represents the unique vehicle (obj_id) in the OBJECT table.
Our goal is to provide the OBJECT object with 3 properties that reference different OBJECT_OPTIONS lists: - OPTIONS OPTIONS - property ACCESSORIES - property STANDARD EQUIPMENT
We tried different textbooks and walkthroughs regarding the hierarchy table using the inheritance model, but could not create a constructive model.
Technically, we did:
- Create OBJECT Object
- Create an object OBJECT_OPTIONS, make it abstract
- Add OPTION, ACCESSORY, and STANDARD_EQUIP objects using the base type OBJECT_OPTIONS
- Add conditions to all three tables at ncopt_type = '...'
- Add 3 navigation properties to OBJECT, all associated with one of the inherited objects: OPTIONS, ACCESSORIES and STANDAARD_EQUIPMENT.
During this installation, a bunch of errors appear, but in the end we get the following:
3032: , 250, 286: EntityTypes NCO.Model.OPTION, NCO.Model.ACCESSOIRE, NCO.Model.STANDAARD_EQUIP OBJECT_OPTIES. , .
.
. , , , .
, , , .