mybatis.net 向数据库插入数据问题

有一个UserInfo表ID为主键 自增长
在xml文件中

<resultMaps>
<!--UserInfoModel类与db表的映射-->
<resultMap id="SelectAllResult" class="UserInfo">
  <result property="ID" column="ID"/>
  <result property="UserID" column="UserID"/>
  <result property="Name" column="Name" />
  <result property="Password" column="Password"/>
  <result property="Mail" column="Mail" />
  <result property="Phone" column="Phone" />
  <result property="Address" column="Address" />
  <result property="CreateTime" column="CreateTime" />
  <result property="Enable" column="Enable" />
</resultMap>

<!--插入新记录-->
<insert id="InsertUserInfo" parameterClass="UserInfo">
  <!--sql 主键的示例用法-->
  <selectKey resultClass="int" type="post" keyProperty="ID">
    select @@IDENTITY as value
  </selectKey>
  <![CDATA[
  INSERT into UserInfo
  (UserID,
   Name,
   Password,
   Mail,
   Phone,
   Address,
   CreateTime,
   Enable)
   VALUES
   (#UserID#,
   #Name#,
   #Password# ,
   #Mail# ,
   #Phone#,
   #Address#,
   #CreateTime#,
   #Enable#)
   ]]>
</insert>

    前台测试
    public void InsertUserInfo()
    {
        UserInfoModel userInfo=new UserInfoModel();

        userInfo.Address = "南京";
        userInfo.CreateTime = DateTime.Now;
        userInfo.Name = "于硕AAA";
        userInfo.Mail = "12245@qq.com";
        userInfo.UserID = "cast";
        userInfo.Password = "zte@2014";
        userInfo.Phone = "15961820351";
        userInfo.Enable = true;
        _batisDao.Insert("InsertUserInfo", userInfo);

    }

    代码运行的时候总是报这个错误,但是数据库中数据已经插入了 请问下是什么情况
    There is no Set member named '' in class 'UserInfoModel'
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问