User172691333 posted
Hi,
I have created a stored querry and want to use it as the update method of my data source object.
Itried the following:
I created a class and wrote a function in that class (using the stored querry), so I can later use that function in my Data source object. But iget an error.
Here is the code and the error I get:
.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace ElogObjectBoundingTest
{
public class Bal
{
public Logbook getLogbookIDs1()
{
using (var context = new APSELOGDataContext())
{
return context.sp_GetLogbooks();
}
}
}
}
But I get the following error:
Error 1 Cannot implicitly convert type 'System.Data.Linq.ISingleResult<ElogObjectBoundingTest.Logbook>' to 'ElogObjectBoundingTest.Logbook'. An explicit conversion exists (are you missing a cast?) C:\Users\ACER\Documents\Visual Studio
2010\Projects\APS\ElogApp\ElogObjectBoundingTest\ElogObjectBoundingTest\Bal.cs 42 24 ElogObjectBoundingTest
Any help is appreciated.