Exemplo n.º 1
0
 public void AddQuestionResponse(OfficeHourQuestionsUpdateRequest model, int oId, int Id)
 {
     DataProvider.ExecuteNonQuery(GetConnection, "dbo.OfficeHourQuestions_AddUpdateResponse",
                                  inputParamMapper : delegate(SqlParameterCollection parametercollection)
     {
         parametercollection.AddWithValue("@Id", Id);
         parametercollection.AddWithValue("@OfficeHourId", oId);
         parametercollection.AddWithValue("@Response", model.Response);
     });
 }
Exemplo n.º 2
0
        public HttpResponseMessage AddUpdateResponse(OfficeHourQuestionsUpdateRequest model, int oId, int Id)
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }
            SucessResponse response = new SucessResponse();

            _officeHourServices.AddQuestionResponse(model, oId, Id);
            return(Request.CreateResponse(response));
        }