아래에 어떤 것을 작성하려고합니다. Extension method.확장 방법이 보이지 않습니다.
그래서 나는
@item.Roles.ConvertToString(...
나는 또한 extancion 방법 자체를 만들어 볼 계획입니다. 그러나 그것은 내가 필요한 장소에 나타나지 않습니다.
@item.Roles. Nothing what I need... :(
실마리?
P. 당신은 자신의 클래스에 정의 된 네임 스페이스를 가져 오지 않은 경우
public static class MyExtensions
{
public static string ConvertToString(this ICollection<IdentityUserRole> identityUserRole)
{
var result = string.Empty;
return result;
}
}
확장 방법을 표시하십시오. –
@TimSchmelter Done –
web.config 또는보기의 맨 위에 클래스에 대한 참조를 추가 했습니까? –