Hi,
I have a method inside the repository, when i am calling that method in the wcfservice it returns the list as null but when i am running the query it is running well but in service method it returns a null list... i dont know where the problem is ..
my code is like this:
in repository the method is :
public List<BUILD_INFO> GetChartInfo(string lineNo, string shiftDateTime, string station)
{
string query = string.Format("SELECT SUM(QTY_BUILD) AS BUILD_QTY, SUM(QTY_FAIL) AS FAIL_QTY, "+
"DATEPART(HH,BUILD_HOUR) AS SHIFT_HOURS FROM BUILD_INFOWITH (NOLOCK) "+
"WHERE LINE_NO='{0}' AND BUILD_HOUR >='{1}' AND STATION='{2}' "+
"GROUP BY DATEPART(HH,BUILD_HOUR) ORDER BY SHIFT_HOURS ",_tableName, lineNo, shiftDateTime, station);
return MYRepository.Fetch<BUILD_INFO>(query);
}
i am calling this method in the service as follows:
var buildInfo=new BuildInfoRepository();
var build=buildInfo.GetChartInfo(lineNo,datetime,station);
in build i am getting null only..
thanks in advance..
kpr.