I'm trying to code a WCF RIA class for the first time in C# (also my first time with the language), just to join some tables for a LightSwitch data source. Following the example code, I created the following class to return my rows of data:
public class StudentTerm
{
[Key]
public string TermCode { get; set; }
public string StudentID { get; set; }
public decimal? TermGPA { get; set; }
public decimal? CumulativeGPA { get; set; }
}
But I'm curious -- what is the purpose of the [Key] typedef? Does it apply only to TermCode in my example, or to the entire class?