首页 新闻 会员 周边

最新版本的Ibatis.net DataMapper出错

0
悬赏园豆:10 [已解决问题] 解决于 2007-12-14 21:39
<P>DataMapper1.2创建Mapper实例没有错,可1.6出错,老是报Null值,在网上没搜到最新版本的,哪位可以做一个最新版本的小例子?谢谢</P>
问题补充: 那个我看过了,我只想用DataMapper, NpetShop里用了DataAccess using IBatisNet.Common.Utilities; using IBatisNet.DataMapper; using IBatisNet.DataMapper.Configuration; /// <summary> /// Mapper 的摘要说明。 /// </summary> namespace LiveBookings { public class Mapper { private static volatile SqlMapper _mapper = null; protected static void Configure(object obj) { _mapper = (SqlMapper)obj; } protected static void InitMapper() { ConfigureHandler handler = new ConfigureHandler(Configure); _mapper = SqlMapper.ConfigureAndWatch(handler); } public static SqlMapper Instance() { if (_mapper == null) { lock (typeof(SqlMapper)) { if (_mapper == null) // double-check InitMapper(); } } return _mapper; } public static SqlMapper Get() { return Instance(); } } } 提示这里出错 ConfigureHandler handler = new ConfigureHandler(Configure); _mapper = SqlMapper.ConfigureAndWatch(handler); 但是换成旧版本的就没错Anders Cui和阿不,我就是学习的你们的文章,但是你们的例子也是旧版本的,不过还是非常感谢。
敏捷的水的主页 敏捷的水 | 初学一级 | 园豆:170
提问于:2007-11-12 21:07
< >
分享
最佳答案
0
http://www.cnblogs.com/anderslly/archive/2007/08/07/npetshopsourcecode.html 看看这个吧
Anders Cui | 小虾三级 |园豆:1570 | 2007-11-13 09:04
其他回答(1)
0
你可以看一下错误在哪里,进而就可以找到原因了
阿不 | 园豆:665 (小虾三级) | 2007-11-13 11:58
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册