I have a entity
public class Avatar
{
[Key]
public int Id { get; set; }
[Required]
private string _linkInString { get; set; }
[NotMapped]
public Uri Link
{
get { return new Uri(_linkInString); }
set { _linkInString = value.AbsoluteUri; }
}
}
which has a private field (_linkInString)
because URI couldn't be saved in database as Uri, only as string.
When at first run, my database is creating I gettable Avatar with only Id column.
Any ideas on how to get around this?
EDIT I just found out that: - names with underscore as first letter are abandoned. - use of internal gives the same result.