1
에 대해 궁금 해서요 wcf 좀 분해 될 경우에는 IRepository
다른 사람들이 Wcf 서비스 계약을 사용할 수 있습니까 (nhibernate asp.net)
2 개의 다른 소스가 동일한 계약을 사용하기 때문에 혼합 : - 1 WCF 에 의해 사용되는 - Asp.net에 의해 다른 Nhibernate
그래서 하나 또는 두 가지 물건을 다른 복제본을 만드는 대신 동일한 계약을 재사용하고 싶었어요.
예제로 더 쉽게 이해할 수 있습니다 ...
[ServiceContract]
public interface ITutorialService
{
[OperationContract]
void AddTutorial(Tutorial newTutorial);
[OperationContract]
List<Tutorial> GetTutorials();
[OperationContract]
void RemoveTutorial(string id);
Tutorial GetTutorialModel();
Tag GetTagModel();
Video GetVideoModel();
IRepository<Tutorial> GetTutorialRepository();
IRepository<Tag> GetTagRepository();
IRepository<Video> GetVideoRepository();
}
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
public class TutorialService : ITutorialService
{
private IRepository<Tutorial> _tutorial;
private IRepository<Tag> _tag;
private IRepository<Video> _video;......
은 짧게 wcf가 잘 작동했는데 Irepository에 [OperationContract]
을 추가하지 않았습니까?
@ 브래드 튼 !! 당신은 내 아침에 <3 –