예제 #1
0
        public async Task Create_Test()
        {
            await _jobAppService.Create(
                new JobEditDto()
            {
                ApiUrl      = "api/job/create",
                Frequency   = FrequencyEnum.每天,
                IsEnable    = false,
                JobName     = "myJob",
                ProjectName = "ddd",
                Id          = 0
            });

            await UsingDbContextAsync(async context =>
            {
                var job = await context.Jobs.FirstOrDefaultAsync(e => e.JobName == "myJob");
                job.ShouldNotBeNull();
            });
        }
예제 #2
0
 public Task <JobDto> Create(CreateOrUpdateJobDto input)
 {
     return(_jobAppService.Create(input));
 }