public void Update(ScheduleAvailabilityUpdateRequest model, int userId)
        {
            string procName = "dbo.ScheduleAvailability_Update";

            _data.ExecuteNonQuery(procName,
                                  inputParamMapper : delegate(SqlParameterCollection col)
            {
                AddCommonParams(model, col);
                col.AddWithValue("@Id", model.Id);
                col.AddWithValue("@ModifiedBy", userId);
            },

                                  returnParameters: null);
        }
예제 #2
0
        public ActionResult <SuccessResponse> Update(ScheduleAvailabilityUpdateRequest model)
        {
            int          code     = 200;
            BaseResponse response = null;

            try
            {
                int userId = _authService.GetCurrentUserId();
                _service.Update(model, userId);

                response = new SuccessResponse();
            }
            catch (Exception error)
            {
                code     = 500;
                response = new ErrorResponse(error.Message);
            }
            return(StatusCode(code, response));
        }