为了在我的类中需要虚拟集合类型,是否有可能创建接口?虚拟集合的接口
问候
namespace Models.Entities
{
public partial class FileType : IMyInterface
{
public long CompanyId { get; set; }
public long FileTypeId { get; set; }
public string AcceptType { get; set; }
//IMyInterface contract
public virtual ICollection<Translation> FileTypeTranslations { get; set; }
public FileType()
{
this.FileTypeTranslations = new HashSet<FileTypeTranslation>();
}
}
public class Translation : EntityTranslation<long, FileType>
{
[Required]
public string TypeName { get; set; }
}
}
在一个单一的行中很好的解释! –