As the error said, you have two choices:
public ISqlMapper Mapper()
{
return IBatisNet.DataMapper.Mapper.Instance();
}
Or:
public SqlMapper Mapper()
{
return (IBatisNet.DataMapper.Mapper.Instance() as
SqlMapper);
}
Regards,
Tom Nguyen
Sr. Developer
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
________________________________
From: Frank van Tour [mailto:[EMAIL PROTECTED]
Sent: Monday, October 22, 2007 2:46 PM
To: [email protected]
Subject: Newbie ibatis Tutorial Error
Hi ,
Just started with ibatis tutorial 1.2.1. ( the .net 2.0 tutorial URL
failed to download ??).
In the singleton class ( as listed below ) I got the following error
(Using VS2005 and .Net 2.0)
Cannot implicitly convert type 'IBatisNet.DataMapper.ISqlMapper' to
'IBatisNet.DataMapper.SqlMapper'.
An explicit conversion exists (are you missing a cast?)
Any clues what's going on here?
-Frank
using IBatisNet.DataMapper;
namespace iBatis
{
/// <summary>
/// Base class for Mapper objects (*Mapper).
/// Provides shared utility methods.
/// </summary>
public abstract class MapperBase
{
public SqlMapper Mapper()
{
return IBatisNet.DataMapper.Mapper.Instance ();
}
}
}
************************************************************************************
This e-mail message and any files transmitted herewith, are intended solely for
the
use of the individual(s) addressed and may contain confidential, proprietary or
privileged information. If you are not the addressee indicated in this message
(or responsible for delivery of this message to such person) you may not
review,
use, disclose or distribute this message or any files transmitted herewith. If
you
receive this message in error, please contact the sender by reply e-mail and
delete
this message and all copies of it from your system.
************************************************************************************