/// <summary> /// This UseCase shows use of the specification pattern instead of building extra functions (like the GetProductUseCase), /// which changes the interface/implementation of the lower layers. /// </summary> /// <param name="request"></param> /// <returns></returns> public IEnumerable <Client> Execute(ClientsRequest request) { //If this gets much larger we could pull out into a factory var spec = new GetClientsSpecification(request); return(_clientRepository.GetBy(spec)); }
public object Get(ClientsRequest request) { var sse = this.TryResolve<IServerEvents>() as MemoryServerEvents; var x = sse.ChannelSubcriptions.Count; return x; }
//TODO: Fix year and lastName filter public GetClientsSpecification(ClientsRequest request) : base() { AddPaging(request.Limit, request.Offset); }