public IEnumerable<MCQuestionDAO> GetMCQuestions() { MCQuestionServiceClient client = new MCQuestionServiceClient(); try { IEnumerable<MCQuestionDAO> result = client.GetMCQuestions(); return result; } catch (FaultException<KaskServiceException> e) { throw new HttpException(e.Message); } }
public bool PostMCQuestion(MCQuestionDAO mCQuestion) { MCQuestionServiceClient client = new MCQuestionServiceClient(); try { bool result = client.CreateMCQuestion(mCQuestion); return result; } catch (FaultException<KaskServiceException> e) { throw new HttpException(e.Message); } }
public MCQuestionDAO GetMCQuestion(int id) { MCQuestionServiceClient client = new MCQuestionServiceClient(); try { MCQuestionDAO result = client.GetMCQuestionByID(id); return result; } catch (FaultException<KaskServiceException> e) { throw new HttpException(e.Message); } }