コード例 #1
0
        public Task <RigOapChecklistQuestionNoAnswerComment> Handle(AddQuestionNoAnswerRequest request, CancellationToken cancellationToken)
        {
            RigOapChecklistQuestionNoAnswerComment model = new RigOapChecklistQuestionNoAnswerComment()
            {
                Id = Guid.NewGuid(),
                CreatedDateTime         = DateTime.UtcNow,
                UpdatedDateTime         = DateTime.UtcNow,
                StartCommentBy          = request.StartedBy,
                OapChecklistQuestionId  = request.OapChecklistQuestionId,
                SourceRigOapChecklistId = request.RigOapChecklistId,
                OapChecklistId          = request.OapChecklistId,
                StartDateTime           = DateTime.UtcNow
            };

            Guid newModelGuid = service.Add(model);
            var  result       = service.Get(newModelGuid);

            return(Task.FromResult(result));
        }
コード例 #2
0
        public Task <RigOapChecklistQuestionNoAnswerComment> Handle(GetNoAnswerByIdRequest request, CancellationToken cancellationToken)
        {
            var result = service.Get(request.Id);

            return(Task.FromResult(result));
        }