I've got an issue with extending the partial class from a TDS generated Template for glass mapper. Basically, I want to add a method to the underlying class to say have a custom string based on a property value.
public partial class _Contributor {
public virtual string ContributorUrlQueryString => $"?name={HttpUtility.UrlEncode(ContributorName)}&id={Id}".ToLower();
}
var contributor = _contentRepository.GetContentItem(id);
Glass Mapper - 1 never hits the function and 2 returns null. Am I missing something?
Update: Changing calling code to use concrete class instead of Interface allows the code to be hit and the expected results: var contributor = _contentRepository.GetContentItem<_Contributor>(id);
However, I would still like to use the Interface...