public Boolean ModifyRequest(Request request)
        {
            ClinicDbContext dbContext = new ClinicDbContext();
            PatientCard     card      = request.Patient;

            dbContext.Set(typeof(PatientCard)).Attach(card);
            dbContext.Set(typeof(Request)).Attach(request);
            dbContext.Entry(card).State    = System.Data.Entity.EntityState.Modified;
            dbContext.Entry(request).State = System.Data.Entity.EntityState.Modified;
            return(0 < dbContext.SaveChanges());
        }
        public Boolean ModifyPatientCard(PatientCard patientCard)
        {
            ClinicDbContext dbContext = new ClinicDbContext();

            dbContext.Set(typeof(PatientCard)).Attach(patientCard);
            dbContext.Entry(patientCard).State = System.Data.Entity.EntityState.Modified;
            return(0 < dbContext.SaveChanges());
        }
        public async Task <Boolean> AddRequest(Request request)
        {
            ClinicDbContext dbContext = new ClinicDbContext();
            await Task.Run(() => {
                PatientCard card = request.Patient;
                dbContext.Set(typeof(PatientCard)).Attach(card);
                dbContext.Entry(card).State = System.Data.Entity.EntityState.Modified;
                dbContext.RequestDbSet.Add(request);
            });

            return(0 < dbContext.SaveChanges());
        }