public ActionResult <SuccessResponse> Post(AttHackathonAddRequest model) { ActionResult result = null; try { //model.ModifiedBy = "User" + _authService.GetCurrentUserId(); SuccessResponse response = new SuccessResponse(); _AttHackathonService.Insert(model); result = Ok200(response); } catch (Exception e) { Logger.LogError(e.ToString()); result = StatusCode(500, new ErrorResponse(e.Message)); } return(result); }
public void Insert(AttHackathonAddRequest model) { _dataProvider.ExecuteNonQuery( "dbo.Hackathon_UserMessageInsert", inputParamMapper : delegate(SqlParameterCollection paramCol) { SqlParameter parm = new SqlParameter { ParameterName = "@_Id", SqlDbType = SqlDbType.Int, Direction = ParameterDirection.Output }; paramCol.Add(parm); paramCol.AddWithValue("@_Username", model.Username); paramCol.AddWithValue("@_ModifiedBy", model.Username); paramCol.AddWithValue("@_MessageId", model.MessageId); paramCol.AddWithValue("@_Message", model.Message); } ); }