Thanks again.
On Wednesday, 1 August 2012 14:46:14 UTC+10, mythz wrote:
> Oh, in that case you want :)
> List<string> results = db.GetFirstColumn<string>(" select [Email] from
>> [Contacts] ")
> Maybe I should provide a better alias? What would be ideal GetList?
> On Wed, Aug 1, 2012 at 12:26 AM, LyphTEC <LyphTEC> wrote:
>> Thanks Demis.
>> Looks like the fully qualified static method is the way to go for me as
>> the file mainly uses OrmLite and I only use Dapper when I need to return a
>> List<string>. I actually did not know that you can call the static
>> extension method directly :)
>> Also, OrmLite's GetScalar<string> is not the same as I need the result to
>> be an IEnumerable<string>
>> On Wednesday, 1 August 2012 14:16:07 UTC+10, mythz wrote:
>>> I can think of a couple of options:
>>> 1. Both Dapper + OrmLite are extension methods off IDbConnection so just
>>> import the one you use most in your C# .cs file and us the fully qualified
>>> static method for the other.
>>> 2. Since Dapper is just a single source include file, rename Dapper's
>>> Query.
>>> On a side-note, Dappers:
>>> result = dbConn.Query<string>("select [Email] from [Contacts]");
>>> can be done like this in OrmLite
>>> result = db.GetScalar<string>("select [Email] from [Contacts]");
>>> On Wed, Aug 1, 2012 at 12:08 AM, LyphTEC wrote:
>>>> Hi,
>>>> I just updated to the latest version of OrmLite and noticed that Dapper
>>>> has now moved to a different namespace and also Query<T> in OrmLite is now
>>>> hanging directly IDbConnection (from IDbCommand).
>>>> There's a few places where I'm using Dapper's version of Query<T> like
>>>> so:
>>>> result = dbConn.Query<string>("select [Email] from [Contacts]");
>>>> but now this is broken because it's trying to use OrmLite's version of
>>>> Query<T> and it doesn't support string as the type because of the where T :
>>>> new()
>>>> Is there any way I can use IDbConnection extensions from Dapper and
>>>> OrmLite within the same file and force it to use Dapper's Query() instead?
>>>> Thanks.
>>> --
>>> - Demis
>>> http://twitter.com/demisbellot
>>> http://www.servicestack.net/**mythz_blog<http://www.servicestack.net/mythz_blog>
> --
> - Demis
> http://twitter.com/demisbellot
> http://www.servicestack.net/mythz_blog