C# ibatis 测试

using System;
using System.Collections.Generic;
using System.Text;
using IBatisNet.DataMapper;

using Com.Chinasofti.PPAS.Model;

namespace Com.Chinasofti.PPAS.Dao
{

    public class DiaryDao
    {

        private ISqlMapper sqlMapper;

        public ISqlMapper SqlMapper
        {
            get { return sqlMapper; }
            set { sqlMapper = value; }
        }

        /// <summary>
        /// get all diary
        /// </summary>
        /// <returns></returns>
        public IList<DiaryBean> GetAllDiary()
        {
            IList<DiaryBean> list = null;
            list = sqlMapper.QueryForList<DiaryBean>("SelectAllDiary", null);
            return list;
        }
    }
}

上一篇:java – Mybatis嵌套集合无法正确使用列前缀


下一篇:为什么 MyBatis 在国内非常流行,而国外 Java 工程师却不愿意使用?