示例#1
0
        public override Task <ApplicantJobApplicationPayload> ReadApplicantJobApplication(ApplicantJobApplicationIdRequest request, ServerCallContext context)
        {
            var poco = _logic.Get(Guid.Parse(request.Id));

            return(new Task <ApplicantJobApplicationPayload>(() => new ApplicantJobApplicationPayload()
            {
                Id = poco.Id.ToString(),
                Applicant = poco.Applicant.ToString(),
                Job = poco.Job.ToString(),
                ApplicationDate = Timestamp.FromDateTime(poco.ApplicationDate)
            }));
        }
示例#2
0
        public override Task <ApplicantJobApplicationPayload> ReadApplicantJobApplication(ApplicantJobApplicationIdRequest request, ServerCallContext context)
        {
            var poco = _logic.Get(Guid.Parse(request.Id));

            if (poco is null)
            {
                throw new ArgumentNullException("No Record found for this Id");
            }

            var AppJobApp = new Task <ApplicantJobApplicationPayload>(
                () => new ApplicantJobApplicationPayload()
            {
                Id              = poco.Id.ToString(),
                Applicant       = poco.Applicant.ToString(),
                Job             = poco.Job.ToString(),
                ApplicationDate = Timestamp.FromDateTime(poco.ApplicationDate),
            });

            return(AppJobApp);
        }
        public override Task <ApplicantJobApplicationReply> GetApplicantJobApplication(ApplicantJobApplicationIdRequest request, ServerCallContext context)
        {
            ApplicantJobApplicationPoco poco = _logic.Get(Guid.Parse(request.Id));

            return(Task.FromResult <ApplicantJobApplicationReply>(FromPOCO(poco)));
        }