public async Task <GenderEntity> CreateGenderAsync(GenderEntity genderEntity, CancellationToken token) { await _dbContext.Genders.AddAsync(genderEntity, token); await _dbContext.SaveChangesAsync(token); return(genderEntity); }
public async Task <DepartmentEntity> CreateDepartmentAsync(DepartmentEntity departmentEntity, CancellationToken token) { await _dbContext.Departments.AddAsync(departmentEntity, token); await _dbContext.SaveChangesAsync(token); return(departmentEntity); }
public async Task <BranchEntity> CreateBranchAsync(BranchEntity branchEntity, CancellationToken token) { await _dbContext.Branches.AddAsync(branchEntity, token); await _dbContext.SaveChangesAsync(token); return(branchEntity); }
public async Task <ModuleEntity> CreateModuleAsync(ModuleEntity moduleEntity, CancellationToken token) { await _dbContext.Modules.AddAsync(moduleEntity, token); await _dbContext.SaveChangesAsync(token); return(moduleEntity); }
public async Task <PageEntity> CreatePageAsync(PageEntity pageEntity, CancellationToken token) { await _dbContext.Pages.AddAsync(pageEntity, token); await _dbContext.SaveChangesAsync(token); return(pageEntity); }
public async Task <SampleEntity> CreateSampleAsync(SampleEntity sampleEntity, CancellationToken token) { await _dbContext.Samples.AddAsync(sampleEntity, token); await _dbContext.SaveChangesAsync(token); return(sampleEntity); }
public async Task <ContainerTypeEntity> CreateContainerTypeAsync(ContainerTypeEntity containerTypeEntity, CancellationToken token) { await _dbContext.ContainerTypes.AddAsync(containerTypeEntity, token); await _dbContext.SaveChangesAsync(token); return(containerTypeEntity); }
public async Task <CategoryEntity> CreateCategoryAsync(CategoryEntity categoryEntity, CancellationToken token) { await _dbContext.Categories.AddAsync(categoryEntity, token); await _dbContext.SaveChangesAsync(token); return(categoryEntity); }
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); }
public async Task <EquipmentEntity> CreateEquipmentAsync(EquipmentEntity EquipmentEntity, CancellationToken token) { EquipmentEntity.IsActive = true; await _dbContext.Equipments.AddAsync(EquipmentEntity, token); await _dbContext.SaveChangesAsync(token); return(EquipmentEntity); }
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)); }
public async Task <OrganisationEntity> AddOrganisationAsync( OrganisationEntity organisationEntity, CancellationToken token) { await _dbContext.Organisations.AddAsync(organisationEntity, token); await _dbContext.SaveChangesAsync(token); return(organisationEntity); }
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)); }
public async Task <UserEntity> CreatePatientAsync(UserEntity patient, CancellationToken token) { await _dbContext.Users.AddAsync(patient, token); await _dbContext.SaveChangesAsync(token); return(patient); }
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)); }
public async Task<MethodEntity> CreateMethodAsync(MethodEntity methodEntity, CancellationToken token) { await _dbContext.Methods.AddAsync(methodEntity, token); await _dbContext.SaveChangesAsync(token); return methodEntity; }