Originally posted by **Kizzik** April 13, 2022
I have a series of DTOs with common properties (Id, CreatedOn, CreatedBy) etc that I have split out as a BaseDto. A primitive example:
`public class BaseDto
{
public Guid Id { get; set; }
}`
`public class SampleDto : BaseDto
{
public string Name { get; set; } = null!;
}`
When I retrieve my SampleDtos, the back-end query being generated by EntityFramework looks like this (note that Id isn't included):
`SELECT [s].[Name]
FROM [Samples] AS [s]`
If, however, I have my entity's properties all directly within the DTO, it works as expected:
`public class SampleDto
{
public Guid Id { get; set; }
public string Name { get; set; } = null!;
}`
Will generate:
`SELECT [s].[Id], [s].[Name]
FROM [Samples] AS [s]`
Have I discovered an issue/limitation, or am I doing something wrong?
Discussed in https://github.com/AutoMapper/AutoMapper.Extensions.OData/discussions/131