コード例 #1
0
        public async Task <GenderEntity> CreateGenderAsync(GenderEntity genderEntity, CancellationToken token)
        {
            await _dbContext.Genders.AddAsync(genderEntity, token);

            await _dbContext.SaveChangesAsync(token);

            return(genderEntity);
        }
コード例 #2
0
        public async Task <DepartmentEntity> CreateDepartmentAsync(DepartmentEntity departmentEntity, CancellationToken token)
        {
            await _dbContext.Departments.AddAsync(departmentEntity, token);

            await _dbContext.SaveChangesAsync(token);

            return(departmentEntity);
        }
コード例 #3
0
        public async Task <BranchEntity> CreateBranchAsync(BranchEntity branchEntity, CancellationToken token)
        {
            await _dbContext.Branches.AddAsync(branchEntity, token);

            await _dbContext.SaveChangesAsync(token);

            return(branchEntity);
        }
コード例 #4
0
        public async Task <ModuleEntity> CreateModuleAsync(ModuleEntity moduleEntity, CancellationToken token)
        {
            await _dbContext.Modules.AddAsync(moduleEntity, token);

            await _dbContext.SaveChangesAsync(token);

            return(moduleEntity);
        }
コード例 #5
0
        public async Task <PageEntity> CreatePageAsync(PageEntity pageEntity, CancellationToken token)
        {
            await _dbContext.Pages.AddAsync(pageEntity, token);

            await _dbContext.SaveChangesAsync(token);

            return(pageEntity);
        }
コード例 #6
0
        public async Task <SampleEntity> CreateSampleAsync(SampleEntity sampleEntity, CancellationToken token)
        {
            await _dbContext.Samples.AddAsync(sampleEntity, token);

            await _dbContext.SaveChangesAsync(token);

            return(sampleEntity);
        }
コード例 #7
0
        public async Task <ContainerTypeEntity> CreateContainerTypeAsync(ContainerTypeEntity containerTypeEntity, CancellationToken token)
        {
            await _dbContext.ContainerTypes.AddAsync(containerTypeEntity, token);

            await _dbContext.SaveChangesAsync(token);

            return(containerTypeEntity);
        }
コード例 #8
0
        public async Task <CategoryEntity> CreateCategoryAsync(CategoryEntity categoryEntity, CancellationToken token)
        {
            await _dbContext.Categories.AddAsync(categoryEntity, token);

            await _dbContext.SaveChangesAsync(token);

            return(categoryEntity);
        }
コード例 #9
0
        public async Task <TestProfileEntity> CreateTestProfileAsync(TestProfileEntity testProfileEntity, CancellationToken token)
        {
            await _dbContext.TestProfiles.AddAsync(testProfileEntity, token);

            await _dbContext.SaveChangesAsync(token);

            return(testProfileEntity);
        }
        public async Task <IndividualTestEntity> CreateIndividualTestMasterAsync(IndividualTestEntity IndividualTestEntity, CancellationToken token)
        {
            IndividualTestEntity.IsActive = true;
            await _dbContext.IndividualTestMasters.AddAsync(IndividualTestEntity, token);

            await _dbContext.SaveChangesAsync(token);

            return(IndividualTestEntity);
        }
コード例 #11
0
        public async Task <EquipmentEntity> CreateEquipmentAsync(EquipmentEntity EquipmentEntity, CancellationToken token)
        {
            EquipmentEntity.IsActive = true;
            await _dbContext.Equipments.AddAsync(EquipmentEntity, token);

            await _dbContext.SaveChangesAsync(token);

            return(EquipmentEntity);
        }
コード例 #12
0
        public async Task <HomeCollectionEntity> CreateHomeCollectionAsync(HomeCollectionEntity homeCollectionEntity, CancellationToken token)
        {
            await _dbContext.HomeCollections.AddAsync(homeCollectionEntity, token);

            await _dbContext.SaveChangesAsync(token);

            return(await _dbContext.HomeCollections
                   .Include(x => x.Gender)
                   .SingleAsync(homeCollection => homeCollection.Id == homeCollectionEntity.Id, token));
        }
コード例 #13
0
        public async Task <OrganisationEntity> AddOrganisationAsync(
            OrganisationEntity organisationEntity,
            CancellationToken token)
        {
            await _dbContext.Organisations.AddAsync(organisationEntity, token);

            await _dbContext.SaveChangesAsync(token);

            return(organisationEntity);
        }
コード例 #14
0
        public async Task <LogisticEntity> CreateLogisticAsync(LogisticEntity logisticEntity, CancellationToken token)
        {
            await _dbContext.Logistics.AddAsync(logisticEntity, token);

            await _dbContext.SaveChangesAsync(token);

            return(await _dbContext.Logistics
                   .Include(logistic => logistic.Driver)
                   .Include(logistic => logistic.LogisticAndLogisticTypes)
                   .ThenInclude(logisticTypeEntity => logisticTypeEntity.LogisticType)
                   .Include(logistic => logistic.LogisticSpecimenTypes)
                   .ThenInclude(logisticTypeEntity => logisticTypeEntity.SpecimenType)
                   .SingleAsync(logistic => logistic.Id == logisticEntity.Id, token));
        }
コード例 #15
0
        public async Task <UserEntity> CreatePatientAsync(UserEntity patient, CancellationToken token)
        {
            await _dbContext.Users.AddAsync(patient, token);

            await _dbContext.SaveChangesAsync(token);

            return(patient);
        }
コード例 #16
0
        public async Task <AppointmentEntity> CreateAppointmentAsync(AppointmentEntity appointmentEntity, CancellationToken token)
        {
            await _dbContext.Appointments.AddAsync(appointmentEntity, token);

            await _dbContext.SaveChangesAsync(token);

            return(await _dbContext.Appointments
                   .Include(x => x.AppointmentStatus)
                   .SingleAsync(appointment => appointment.Id == appointmentEntity.Id, token));
        }
コード例 #17
0
 public async Task<MethodEntity> CreateMethodAsync(MethodEntity methodEntity, CancellationToken token)
 {
     await _dbContext.Methods.AddAsync(methodEntity, token);
     await _dbContext.SaveChangesAsync(token);
     return methodEntity;
 }