Hi,
Suppose if there are 10 records in employee table.
I have a stored procedure named GetEmpCount which returns employee count. (i.e., The answer is 10).
i.e., Select count(*) from employee
--------------------------------------------------------------------------------------------------------------------
I have drag and dropped GetEmpCount stored procedure on to the LINQ dbml designer.
Now I am writing a method like as follows.
public int GetEmployeeCoun t()
{
DatabaseContext db=new DatabaseContext ();
int result =db.GetEmpCount ();
return result;
}
The result should be 10.
But when I build the classlibrary, I am getting error like
Error Cannot implicitly convert type 'System.Data.Li nq.ISingleResul t<GetEmpCountRe sult>' to 'int'
I request you to help me in this regard.
Thanks,
Silpa
Suppose if there are 10 records in employee table.
I have a stored procedure named GetEmpCount which returns employee count. (i.e., The answer is 10).
i.e., Select count(*) from employee
--------------------------------------------------------------------------------------------------------------------
I have drag and dropped GetEmpCount stored procedure on to the LINQ dbml designer.
Now I am writing a method like as follows.
public int GetEmployeeCoun t()
{
DatabaseContext db=new DatabaseContext ();
int result =db.GetEmpCount ();
return result;
}
The result should be 10.
But when I build the classlibrary, I am getting error like
Error Cannot implicitly convert type 'System.Data.Li nq.ISingleResul t<GetEmpCountRe sult>' to 'int'
I request you to help me in this regard.
Thanks,
Silpa
Comment