1
나는 코드 생성기에 의해 생성 된 부분 클래스가Dependeny 주입 및 부분 클래스
public partial class PersonRepository: IPersonRepository
{
public string Method1(){...}
public string Method2(){...}
//...
}
나는이 클래스를 확장하고 내가 이런 식으로
시도 의존성 삽입 (Dependency Injection)을를 사용할 수 있도록하고 싶습니다
다음 DI 매핑시 IPersonRepositoryExtended
에서 PersonRepositoryExtended
까지이 방법이 더 좋습니까?
PersonRepository
의 부분 클래스를 만들어야하고 어떻게하면 인터페이스 매핑이 작동합니까?
'PersonRepositoryExtended' 클래스 나'extended '인터페이스가 반드시 필요한 것은 아닙니다. 단순히 'public partial class PersonRepository'가있는 다른 파일을 추가하고 거기에 메소드를 추가하십시오. – GreatAndPowerfulOz
_extend_ 단어를 사용하면 _derive_ 또는 _inherit_와 같은 기술적 인 의미로 사용합니까, 아니면 부분 클래스의 다른 부분을 만드는 방법을 찾고 있습니까? –