Help the documentation team understand which areas of ASP.NET and Tooling need better help topics

About documentation of the EF 6, is necessary apply corrections on the examples of the topics: TPT Inheritance and TPH Inheritance

About documentation of the Entity Framework 6, is necessary apply corrections on the examples of the topics: TPT Inheritance Pattern and TPH Inheritance Pattern.

These topics in the code source using the method OfType<>, but this resource is specific of the Entity 5.0 and not is supported on the Entity 6.

Therefore it is necessary to correct the samples and remove the use of the method OfType <>. Below, an example of usage corrected:

using (var context = new SchoolEntities())
{
Console.WriteLine("All people:");
foreach (var person in context.People)
{
Console.WriteLine(" {0} {1}", person.FirstName, person.LastName);
}

Console.WriteLine("Instructors only: ");
// The method OfType <> is no longer supported in the Entity 6.
// ------------------------------------------------------------
//foreach (var person in context.People.OfType<Instructor>())
foreach (var person in context.Instructor)
{
Console.WriteLine(" {0} {1}", person.FirstName, person.LastName);
}

Console.WriteLine("Students only: ");
// The method OfType <> is no longer supported in the Entity 6.
// ------------------------------------------------------------
//foreach (var person in context.People.OfType<Student>())
foreach (var person in context.Student)
{
Console.WriteLine(" {0} {1}", person.FirstName, person.LastName);
}
}

The topics can be found through the following steps:

1. Open the site "www.asp.net/entity-framework";
2. Click on the link "Get Started";
3. Then click on the link "Entity Framework 6" and realize that the documentation is divided into topics;
4. Navigate to the topic "Learn More About Setting Up Your Model" within this topic is that the subjects are treated: "TPT Inheritance Pattern" and "TPH Inheritance Pattern."
5. Finally, open each of the subjects, and see that the examples are using the method OfType <>, and this resource is specific Entity 5.

I hope I have contributed!

1 vote
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Mario CardosoMario Cardoso shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    2 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base