FluentData.IDbCommand does not contain definition for 'Query' error

Jul 29, 2013 at 9:55 PM
I'm new to using FluentData and working with an existing application that is using it.

When I'm trying to build in Visual Studio I first downloaded the dll and added it as a reference.

Now I get the following error:
'FluentData.IDbCommand' does not contain a definition for 'Query' and no extension method 'Query' accepting a first argument of type 'FluentData.IDbCommand' could be found (are you missing a using directive or an assembly reference?)

The line of code is as follows:
                var result = Proxy.Context.Sql(query.ToString()).Query<T>().FirstOrDefault();
Any assistance will be greatly appreciated.

Jul 30, 2013 at 4:17 PM
Edited Jul 30, 2013 at 4:18 PM
There is no such method Query<T> in FluentData IDbCommand. If you want to return single result then use QuerySingle<T> or if query will return multiple resluts then use QueryMultiple<T>. Your above code should be somthing like this
var result = Proxy.Context.Sql(query.ToStrin;g()).QuerySingle<T>();
Jul 30, 2013 at 4:33 PM
Thank you Leadfoot very useful information.