Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Permit
- {
- public int PermitId { get; set; }
- public char Discipline { get; set; }
- public PermitDetails PermitDetails { get; set; }
- }
- public PermitDetails
- {
- public int PermitId { get; set; }
- }
- public class GasPermitDetails : PermitDetails
- {
- ... permit details
- }
- public class ElectricalPermitDetails : PermitDetails
- {
- ... permit details
- }
- *tblPermit*
- PermitId, int
- Discipline, char
- .... some other columns
- *tblGas*
- PermitId, int
- ....gasDetails
- *tblElectrical*
- PermitId, int
- ....electrical details
- +---------------+ +----------------------+
- | | 1 1 | |
- | tblPermit |<------->| tblGas |
- | | | (for gas discipline) |
- | | | |
- +---------------+ +----------------------+
- | | | |
- | {PK} PermitId | | {FK} PermitID | <- ForeignKey to tblPermit.PermitID
- | | | |
- +---------------+ +----------------------+
Add Comment
Please, Sign In to add comment