// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { var PatientOptions = new DbContextOptionsBuilder <PatientContext>() .UseInMemoryDatabase("Patients").Options; var DrugOptions = new DbContextOptionsBuilder <DrugContext>() .UseInMemoryDatabase("Drugs").Options; var DosagesOptions = new DbContextOptionsBuilder <DosageContext>() .UseInMemoryDatabase("Dosage").Options; var PatientCont = new PatientContext(PatientOptions); var DrugCont = new DrugContext(DrugOptions); var DosageCont = new DosageContext(DosagesOptions); IRelationshipService Relationship = new RelationshipService(PatientCont, DrugCont, DosageCont); services.AddSingleton(Relationship); services.AddDbContext <PatientContext>(opt => opt.UseInMemoryDatabase("Patients")); services.AddDbContext <DrugContext>(opt => opt.UseInMemoryDatabase("Drugs")); services.AddDbContext <DosageContext>(opt => opt.UseInMemoryDatabase("Dosage")); services.AddControllers(); }
public PTransactionsController(TransactionContext pTransactionContext, PolicyHolderContext policyHolderContext, PolicyContext policyContext, DrugContext drugContext, PolicyDrugContext policyDrugContext) { _transactionContext = pTransactionContext; _policyHolderContext = policyHolderContext; _policyContext = policyContext; _drugContext = drugContext; _policyDrugContext = policyDrugContext; }
public UnitOfWork(DrugContext context, IDrugRepository drugRepository, ISuffixRepository suffixRepository) { _context = context; DrugRepository = drugRepository; SuffixRepository = suffixRepository; }
public DrugPayController(DrugContext ctx) { _compensationTypeCalculators = new List <ICompensationTypeCalculator> { new Government(), new HealthInsurance(), new SpecialFund() }; _ctx = ctx; Initialize(); }
public PoliciesController(PolicyContext pc, PolicyDrugContext pdc, DrugContext dc) { _policyContext = pc; _policyDrugContext = pdc; _drugContext = dc; }
public VerifiedPhysiciansController(VerificationContext verificationContext, PrescriptionContext prescriptionContext, DrugContext drugContext) { _verificationContext = verificationContext; _prescriptionContext = prescriptionContext; _drugContext = drugContext; }
public PrescriptionsController(PrescriptionContext prescriptionContext, DrugContext drugContext, VerificationContext verificationContext) { _prescriptionContext = prescriptionContext; _drugContext = drugContext; _verificationContext = verificationContext; }
public RelationshipService(PatientContext patc, DrugContext drugc, DosageContext dosagec) { _patientContext = patc; _drugContext = drugc; _dosageContext = dosagec; }
public DrugRepository(DrugContext context) { _context = context; }
public SuffixRepository(DrugContext context) { _context = context; }
public DrugController(DrugContext db, IMapper mapper, IWebHostEnvironment appEnvironment) { this.db = db; _mapper = mapper; _appEnvironment = appEnvironment; }
public DrugsController(DrugContext context) { _context = context; }
public PrescriptionListViewComponent(PrescriptionContext prescriptionContext, DrugContext drugContext, VerificationContext verificationContext) { _prescriptionContext = prescriptionContext; _drugContext = drugContext; _verificationContext = verificationContext; }
public drugsController(DrugContext context, IRelationshipService irs) { _context = context; _relationshipService = irs; }