Skip to content
Advertisement

Tag: inheritance

LINQ to SQL, select from an inheritted class

Using LINQ to SQL and Object Relational Designing; Let’s say we have a class Animal with two inherited classes, named Cat and Dog. We can load the “Animal” class and its properties easily: However, when trying to load Cat or Dog, dataContext has the attribute of neither Cats nor Dogs. How is it possible to load a Cat or a

Advertisement