The way I usually create my applications is by creating the database first and using LINQ to SQL to create the classes for me. But in my current project I want to try and use inheritance, and I don't think it's possible creating inheritance in a database?
Thus I'm wondering how I would create an inheriting class with SQL Server / LINQ, so I can save / get data from my database. For example if I have The parent:
- contact (id, name, telephone number, address, email..)
And the children:
- customer(id, title, activity, discount, vat...)
- supplier (id, title, activity, vat, bankaccount_number, manager, expiration_day...)
- driver (id, first name, hire_date, fire_date, function, date of birth...)
How would I create a working database connection for these classes? I don't have a lot of experience with creating classes as I usually let Visual Studio (LINQ) create them for me.
I'd greatly appreciate any help, Thanks :)