UIHint can not resolve template in abstract models

Posted by Reza Owliaei on Stack Overflow See other posts from Stack Overflow or by Reza Owliaei
Published on 2014-06-08T08:54:34Z Indexed on 2014/06/08 15:25 UTC
Read the original article Hit count: 268

Assume an abstract model like this:

 public abstract class MyClass : BaseEntity
{
    [UIHint("File")]
    public long? DocumentFileId { get; set; }
}

The problem is Cannot resolve template 'File', while there is File.cshtml in View editor templates.

The point is, if I don't define MyClass as an abstract class, error will be solved.

My question is, why editor template can not resolve in abstract classes, and how can I handle it?

© Stack Overflow or respective owner

Related posts about c#

Related posts about abstract-class