C# ASP.NET MVC Basics Modeling and Presenting Data Creating a Data Model

Matthew Avella
Matthew Avella
2,515 Points

Compile error on challenge pt 2

I'm getting a compiler error on part 2 of the creating a data model task. Not sure what's wrong.

namespace Treehouse.Models
    public class VideoGame {
        public int Id {get; set;}
        public string Title {get; set;}
        public string Description {get; set;}
        public string[] Characters {get; set;}
        public string Publisher {get; set;}

    public string DisplayText {
        get {
            return Title + " (" + Publisher + ")";   

1 Answer

Steven Parker
Steven Parker
205,163 Points

You've placed your task 2 code after the class, but it should be inside the class with the other properties.