예제 #1
0
        // 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();
        }
예제 #2
0
 public PTransactionsController(TransactionContext pTransactionContext, PolicyHolderContext policyHolderContext, PolicyContext policyContext, DrugContext drugContext, PolicyDrugContext policyDrugContext)
 {
     _transactionContext  = pTransactionContext;
     _policyHolderContext = policyHolderContext;
     _policyContext       = policyContext;
     _drugContext         = drugContext;
     _policyDrugContext   = policyDrugContext;
 }
예제 #3
0
 public UnitOfWork(DrugContext context,
                   IDrugRepository drugRepository,
                   ISuffixRepository suffixRepository)
 {
     _context         = context;
     DrugRepository   = drugRepository;
     SuffixRepository = suffixRepository;
 }
예제 #4
0
 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;
 }
예제 #8
0
 public RelationshipService(PatientContext patc, DrugContext drugc, DosageContext dosagec)
 {
     _patientContext = patc;
     _drugContext    = drugc;
     _dosageContext  = dosagec;
 }
예제 #9
0
 public DrugRepository(DrugContext context)
 {
     _context = context;
 }
예제 #10
0
 public SuffixRepository(DrugContext context)
 {
     _context = context;
 }
예제 #11
0
 public DrugController(DrugContext db, IMapper mapper, IWebHostEnvironment appEnvironment)
 {
     this.db         = db;
     _mapper         = mapper;
     _appEnvironment = appEnvironment;
 }
예제 #12
0
 public DrugsController(DrugContext context)
 {
     _context = context;
 }
 public PrescriptionListViewComponent(PrescriptionContext prescriptionContext, DrugContext drugContext, VerificationContext verificationContext)
 {
     _prescriptionContext = prescriptionContext;
     _drugContext         = drugContext;
     _verificationContext = verificationContext;
 }
예제 #14
0
 public drugsController(DrugContext context, IRelationshipService irs)
 {
     _context             = context;
     _relationshipService = irs;
 }