I was building an MVC asp.net core Application. For defining the models we can use two syntaxes.
class Category
{
[Key]
public int id ;
public string Name ;
public int DisplayOrder ;
}
Does it makes any difference in defining the model in any of the two ways ?
class Category
{
[Key]
public int id { get; set; }
public string Name { get; set; }
public int DisplayOrder { get; set; }
}