コード例 #1
0
        public List <JobQueueViewModel> GetQueuesByAccountAndFunctionName(JobQueueViewModel model)
        {
            var queuesDbModels = new GetJobQueuesByAccountIdCommandHandler().Handle(new GetJobQueuesByAccountIdCommand
            {
                AccountId    = model.AccountId,
                IsForSpy     = model.IsForSpy,
                FunctionName = model.FunctionName
            });

            return(queuesDbModels.Select(queueModel => new JobQueueViewModel
            {
                AccountId = queueModel.AccountId,
                Id = queueModel.Id,
                FunctionName = queueModel.FunctionName,
                AddedDateTime = queueModel.AddedDateTime,
                IsForSpy = queueModel.IsForSpy,
                FriendId = queueModel.FriendId,
                FunctionStringName = new GetFunctionNameByNameQueryHandler(new DataBaseContext()).Handle(new GetFunctionNameByNameQuery
                {
                    FunctionName = queueModel.FunctionName
                }),
                JobId = queueModel.JobId,
                IsProcessed = queueModel.IsProcessed
            }).ToList());
        }
コード例 #2
0
        public List <JobQueueViewModel> GetQueuesByAccountId(JobQueueViewModel model)
        {
            var queuesDbModels = new GetJobQueuesByAccountIdCommandHandler().Handle(new GetJobQueuesByAccountIdCommand
            {
                AccountId = model.AccountId,
                IsForSpy  = model.IsForSpy
            });

            return(queuesDbModels.Select(queueModel => new JobQueueViewModel
            {
                AccountId = queueModel.AccountId,
                Id = queueModel.Id,
                FunctionName = queueModel.FunctionName,
                AddedDateTime = queueModel.AddedDateTime,
                IsForSpy = queueModel.IsForSpy,
                FriendId = queueModel.FriendId,
                IsProcessed = queueModel.IsProcessed
            }).ToList());
        }