Q:

odata v4, List<> Property without expand

Is it possible in odata4 to create a model such as:
    public class PuppyDogs
    {

        public string Name { get; set; }

        public virtual IList<Bone> Bones { get; set; }
    }

    public class Bone
    {
        public string ChewType { get; set; }

        public int Numberofchews { get; set; }        

    }

And the controller class looks like
public class PuppyDogController : ODataController
{
    List<PuppysDog> mydogs = new List<PuppysDog>();

    private PuppyDogController()
    {
        if (mydogs.Count == 0)
        {
            PuppysDog mydog = new PuppysDog();

            mydog.Name = "Fido";

            mydog.Bones = new List<Bone>()
            {
                new Bone{ ChewType = "Soft", Numberofchews=1 },
                  new Bone{ ChewType = "Hard", Numberofchews=2 }
            };

            mydogs.Add(mydog);
        }
    }

    [EnableQuery]
    public IQueryable<PuppysDog> Get()
    {
        return mydogs.AsQueryable();
    }
}

Can I include the Bones property of PuppyDogs without using expand? By default Bones is not returned to the client.

A:

There are several things nor clear in your code, for example, the entity set PuppyDogs don't have a key, the naming convention in the controller is a little wired and etc. With the following code, it can work perfectly, please take a look
PuppyDog.cs
public class PuppyDog
{
    [Key]
    public string Name { get; set; }

    public virtual IList<Bone> Bones { get; set; }
}

Bone.cs
public class Bone
{
    public string ChewType { get; set; }

    public int Numberofchews { get; set; }

}

PupyyDogsController.cs
public class PuppyDogsController : ODataController
{
     List<PuppyDog> mydogs = new List<PuppyDog>();

    private PuppyDogsController()
    {
        if (mydogs.Count == 0)
        {
            PuppyDog mydog = new PuppyDog();

            mydog.Name = "Fido";

            mydog.Bones = new List<Bone>()
            {
                new Bone {ChewType = "Soft", Numberofchews = 1},
                new Bone {ChewType = "Hard", Numberofchews = 2}
            };

            mydogs.Add(mydog);
        }
    }

    [EnableQuery]
    public IQueryable<PuppyDog> Get()
    {
        return mydogs.AsQueryable();
    }
}

WebApiConfig.cs
public static class WebApiConfig
{
    public static void Register(HttpConfiguration config)
    {
        ODataConventionModelBuilder builder = new ODataConventionModelBuilder();

        builder.EntitySet<PuppyDog>("PuppyDogs");

        config.MapODataServiceRoute("odata", null, builder.GetEdmModel(), new DefaultODataBatchHandler(GlobalConfiguration.DefaultServer));
        config.EnsureInitialized();
    }
}

Then when try http://localhost:21830/PuppyDogs, I can successfully got the payload as 
{
    "@odata.context": "http://localhost:21830/$metadata#PuppyDogs",
    "value": [
     {
      "Name": "Fido",
      "Bones": [
         {
           "ChewType": "Soft",
           "Numberofchews": 1
         },
         {
           "ChewType": "Hard",
           "Numberofchews": 2
         }  
        ]
       }
     ]
}

