public CustomerController(PostCommand <Customer> command, GetAllCommand <Customer> getCommand, PutCommand <Customer> putCommand) { this.postCommand = command; this.putCommand = putCommand; this.getAllCommand = getCommand; }
public OrderController(PostCommand <Order> command, GetAllCommand <Order> getAllCommand, DeleteCommand deleteCommand) { this.postCommand = command; this.getAllCommand = getAllCommand; this.deleteCommand = deleteCommand; }
public TransactionController(PostCommand <Transaction> command, GetAllCommand <Transaction> getCommand, GetStringCommand <Transaction> getStringCommand) { this.postCommand = command; this.getAllCommand = getCommand; this.getStringCommand = getStringCommand; }
public AccountController(PostCommand <Account> command, GetAllCommand <Account> getAllCommand, GetStringCommand <Account> getStringCommand, DeleteCommand deleteCommand, PutCommand <Account> putCommand) { this.postCommand = command; this.getAllCommand = getAllCommand; this.getStringCommand = getStringCommand; this.deleteCommand = deleteCommand; this.putCommand = putCommand; }
private string PerformGetAll(GetAllCommand command) { if (!_storage.IsEmpty) { return(_storage.Aggregate("", (current, keyValue) => current + ($"\nKey: {keyValue.Key}" + " " + $"Value: {keyValue.Value.Display()}"))); } // TODO: add error handling return("The storage is empty"); }
public Task <PagedList <CountryView> > Handle(GetAllCommand request, CancellationToken cancellationToken) { var pagedList = _countryService.GetAllCountries(request.Paged.PageIndex, request.Paged.PageSize); return(Task.FromResult(pagedList.ConvertPagedList <Nop.Core.Domain.Directory.Country, CountryView>())); }