Exemplo n.º 1
0
 public BaseService(HappContext dbContext)
 {
     emrRepository     = new EMRRepository(dbContext);
     codeRepository    = new CodeRepository(dbContext);
     queriseRepository = new QueriseRepository(dbContext);
     sessionRepository = new SessionRepository(dbContext);
     doctorRepository  = new DoctorRepository(dbContext);
     patientRepository = new PatientRepository(dbContext);
 }
Exemplo n.º 2
0
 public void TestInitialize()
 {
     transactionScope = new TransactionScope();
     dbContext        = new HappContext();
     repository       = new DoctorRepository(dbContext);
     doctor           = new Doctor()
     {
         ID = Id, privateKey = priKey, PublicKey = pubKey, Name = name
     };
 }
Exemplo n.º 3
0
 public void TestInitialize()
 {
     transactionScope = new TransactionScope();
     dbContext        = new HappContext();
     repository       = new CodeRepository(dbContext);
     code             = new Code()
     {
         Cprikey = priKey, Cpubkey = pubKey, SessionKey = sessionKey
     };
 }
Exemplo n.º 4
0
 public void TestInitialize()
 {
     transactionScope = new TransactionScope();
     dbContext        = new HappContext();
     repository       = new QueriseRepository(dbContext);
     querise          = new Querise()
     {
         EID        = Guid.NewGuid(),
         DID        = Id,
         SessionKey = sessionKey
     };
 }
Exemplo n.º 5
0
        static void Main(string[] args)
        {
            HappContext        dbContext         = new HappContext();
            IEMRRepository     eMRRepository     = new EMRRepository(dbContext);
            ISessionRepository sessionRepository = new SessionRepository(dbContext);
            EMR eMR = new EMR()
            {
                ID = Guid.NewGuid(), Ppubkey = "P@u0d?#1N3z"
            };

            eMRRepository.Add(eMR);
            dbContext.SaveChanges();
        }
Exemplo n.º 6
0
 public void TestInitialize()
 {
     transactionScope  = new TransactionScope();
     dbContext         = new HappContext();
     sessionrepository = new SessionRepository(dbContext);
     doctorRepository  = new DoctorRepository(dbContext);
     patientRepository = new PatientRepository(dbContext);
     doctor            = new Doctor();
     patient           = new Patient();
     session           = new Session()
     {
         PID  = patient.ID,
         DID  = doctor.ID,
         Date = DateTime.Now,
     };
 }
Exemplo n.º 7
0
 public DoctorService(HappContext context) : base(context)
 {
     this.context = context;
 }
Exemplo n.º 8
0
 public PatientService(HappContext context) : base(context)
 {
 }
Exemplo n.º 9
0
 public CAService(HappContext context) : base(context)
 {
 }
Exemplo n.º 10
0
 public ServiceUse(HappContext dbcontext)
 {
     this.dbcontext = dbcontext;
 }