while I was building MVC5 model with SQLite. the time span is tricky so I stored the tick instead. but then I get trouble on display name for it.
[PetaPoco.TableName("UserStatus")]
[PetaPoco.PrimaryKey("iUserId", AutoIncrement = true)]
public class User
{
[Column]
[DisplayName("User ID")]
public int iUserId { get; set; }
[Column]
[DisplayName("User Name")]
public string sUserName { get; set; }
//[DisplayName("Average Time")] this line won't work
public TimeSpan tsAvgTime;
[Column]
public long longAvgTimeTick
{
get { return tsAvgTime.Ticks; }
set { tsAvgTalkTime = new TimeSpan(value); }
}
}
so what should I do to add a display name instead of change the display on the view.