是否可以从这样的东西注入:
public class DomainEntity
{
public Resource DescriptionResource { get; set; }
}
public class Resource
{
public List<ResourceLocalization> Localizations { get; set; }
}
public class ResourceLocalization
{
public string Culture { get; set; }
public string Value { get; set; }
}
像这样:
public class DomainEntityViewModel
{
public string Description { get; set; }
}
(DomainEntity.DescriptionResource.Localizations.First().Value => DomainEntityViewModel.Description)
使用值注入器。
谢谢你!