Skip to content

Instantly share code, notes, and snippets.

@MissaouiChedy
Created May 10, 2017 09:53
class Person
{
public long Id { get; set; }
[MaxLength(50)]
public string Name { get; set; }
}
class PersonViewModel
{
...
public long Id { get; set; }
/*
[MaxLength(50)] is applied implicitly or explicitly,
statically or dynamically
*/
public string Name { get; set; }
public string GetCapitalizedName() { ... }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment