Example #1
0
        public async Task <TestSubject> PutTestSubject(Guid id, TestSubject testSubject)
        {
            db.Entry(testSubject).State = EntityState.Modified;

            try
            {
                await db.SaveChangesAsync();
            }
            catch (Exception ex)
            {
                throw;
            }
            return(testSubject);
        }
        public async Task <QuestionPaper> PutQuestionPaper(Guid id, QuestionPaper questionPaper)
        {
            db.Entry(questionPaper).State = EntityState.Modified;

            try
            {
                await db.SaveChangesAsync();
            }
            catch (Exception ex)
            {
                throw;
            }

            return(questionPaper);
        }
Example #3
0
        public async Task <Answers> PutAnswers(Guid id, Answers answers)
        {
            db.Entry(answers).State = EntityState.Modified;

            try
            {
                await db.SaveChangesAsync();
            }
            catch (Exception ex)
            {
                throw;
            }

            return(answers);
        }
        public async Task <TestCategory> PutTestCategory(Guid id, TestCategory testCategory)
        {
            db.Entry(testCategory).State = EntityState.Modified;

            try
            {
                await db.SaveChangesAsync();
            }
            catch (Exception ex)
            {
                throw;
            }

            return(testCategory);
        }
        public async Task <ContactUs> PutContactUs(Guid id, ContactUs contactUs)
        {
            dBContext.Entry(contactUs).State = EntityState.Modified;

            try
            {
                await dBContext.SaveChangesAsync();
            }
            catch (Exception ex)
            {
                throw;
            }

            return(contactUs);
        }