public void Update(InsurancePlanUpdateRequest model, int userId)
 {
     _data.ExecuteNonQuery(
         "dbo.InsurancePlans_Update_V2",
         delegate(SqlParameterCollection col)
     {
         col.AddWithValue("@Id", model.Id);
         col.AddWithValue("@InsuranceProviderId", model.InsuranceProviderId);
         col.AddWithValue("@Name", model.Name);
         col.AddWithValue("@PlanTypeId", model.PlanTypeId);
         col.AddWithValue("@PlanLevelId", model.PlanLevelId);
         col.AddWithValue("@Code", model.Code);
         col.AddWithValue("@PlanStatusId", model.PlanStatusId);
         col.AddWithValue("@MinAge", model.MinAge);
         col.AddWithValue("@MaxAge", model.MaxAge);
         col.AddWithValue("@ModifiedBy", userId);
     }, null);
 }
        public ActionResult <SuccessResponse> Update(InsurancePlanUpdateRequest model)
        {
            int          code     = 200;
            BaseResponse response = null;

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

                response = new SuccessResponse();
            }
            catch (Exception ex)
            {
                code = 500;

                response = new ErrorResponse(ex.Message);
            }
            return(StatusCode(code, response));
        }