Try this – set the default value in the constructor:
public class YOURMODEL
{
public int MyId { get; set; }
public YOURMODEL()
{
MyId = 1;
}
}
Later addition by other user: Since C# 6.0 (2015) this simpler syntax has been allowed:
public class YOURMODEL
{
public int MyId { get; set; } = 1;
}