In my queries i want achive that all vehicles except the prototype vehicles are returned, which has more properties. The query is build with OfType() but it seems that this has no influence of the behaviour.
public abstract class BaseVehicle
{
public int Id { get; set; }
}
public class Vehicle : BaseVehicle
{
public string VehicleIdentificationNumber { get; set; }
}
public class VehiclePrototype : Vehicle
{
public DateTimeOffset? PressReleaseAt { get; set; }
}
Is this normal? What is the right way to filtrer the entities?
Further technical details
EF Core version: 2.1
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
Operating system: Windows 10
IDE: Visual Studio 2017 Pro 15.8.4