public GetCommunicationResponse GetCommunication(GetCommunicationRequest request) { CommunicationView view = new CommunicationView(ObjectFactory.Create<IReadModelStore>()); CommunicationDto dto = view.Load(request.CommunicationId); GetCommunicationResponse response = new GetCommunicationResponse(); response.Communication = dto; return response; }
public GetCommunicationListResponse GetCommunicationList(GetCommunicationListRequest request) { CommunicationView view = new CommunicationView(ObjectFactory.Create<IReadModelStore>()); List<CommunicationDto> list = view.GetList(request.Filter); if (list != null) { for (int i = list.Count - 1; i >= 0; i--) { if (list[i].Owner != request.Owner || list[i].OwnerId != request.OwnerId) list.RemoveAt(i); } } GetCommunicationListResponse response = new GetCommunicationListResponse(); response.CommunicationList = list; return response; }