public void Update(IssueLogForAdminUpdateRequest model) { DataProvider.ExecuteNonQuery("dbo.IssueLogForUsers_Update", inputParamMapper: (SqlParameterCollection inputs) => { inputs.Add(SqlDbParameter.Instance.BuildParameter("@Id", model.Id, SqlDbType.Int)); inputs.Add(SqlDbParameter.Instance.BuildParameter("@IssueLogTypeId", model.IssueLogTypeId, SqlDbType.Int)); inputs.Add(SqlDbParameter.Instance.BuildParameter("@IssueTitle", model.IssueTitle, SqlDbType.NVarChar, 100)); inputs.Add(SqlDbParameter.Instance.BuildParameter("@IssueText", model.IssueText, SqlDbType.NVarChar, 4000)); inputs.Add(SqlDbParameter.Instance.BuildParameter("@StatusCode", model.StatusCode, SqlDbType.NVarChar, 50)); inputs.Add(SqlDbParameter.Instance.BuildParameter("@SubmittedUserBaseId", model.SubmittedUserBaseId, SqlDbType.Int)); }); }
public IHttpActionResult Put(IssueLogForAdminUpdateRequest model) { try { _issueLogForAdminService.Update(model); return Ok(new SuccessResponse()); } catch (Exception ex) { _appLogService.Insert(new AppLogAddRequest { AppLogTypeId = 1, Message = ex.Message, StackTrace = ex.StackTrace, Title = "Error in " + GetType().Name + " " + System.Reflection.MethodBase.GetCurrentMethod().Name, }); return BadRequest(ex.Message); } }