Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialCalvin Secrest
24,815 PointsBummer! Did you remove or change the Issue class?
In Issue.cs make the Name and DescriptionOfProblem properties required by adding [Required] data annotations to those properties.
Not sure if I did this challenge right?
using System.ComponentModel.DataAnnotations;
namespace IssueReporter.Models
{
public class Issue
{
public enum SeverityLevel
{
Minor,
Major,
Critical
}
public int Id { get; set; }
public string Name { get; set; }
public string Email { get; set; }
[Required]
[Display(Name = "Department")]
public int DepartmentId { get; set; }
public Department Department { get; set; }
public SeverityLevel Severity { get; set; }
public bool Reproducible { get; set; }
[Required]
[Display(Name = "Description of Problem")]
public string DescriptionOfProblem { get; set; }
}
}
1 Answer
Steven Parker
231,198 PointsYou can be sure your answer is not right when you see "Bummer!".
You got the DescriptionOfProblem part right, but the challenge also asked you to make the Name property required. You appear to have made DepartmentId required instead.
Calvin Secrest
24,815 PointsCalvin Secrest
24,815 PointsThanks again for you response and assistance