I have the following class:
public class Content {
public string PartitionKey { get; set; }
public string RowKey { get; set; }
}
The following View Model:
public class ContentViewModel
{
public ContentViewModel() { }
public Content Content { get; set; }
public bool UseRowKey {
get {
return this.Content.PartitionKey.Substring(2, 2) == "05" ||
this.Content.PartitionKey.Substring(2, 2) == "06";
}
}
}
I created the field "UseRowKey" in the ViewModel. However can I also create this as a method that's part of the class Content?