I am new to Linq server. I have a stored procedure in my databse that retuens count number.
select COUNT(*) from tbl_WorkerUsers
where WorkerCode=@Wcode
Define your Stored Procedure like this:
CREATE PROCEDURE [dbo].[checkWorkerCodeAvailibility]
@Wcode int = 0
AS
BEGIN
SET NOCOUNT ON;
DECLARE @Result INT
SELECT @Result = COUNT(*) FROM tbl_WorkerUsers WHERE WorkerCode=@Wcode
RETURN @Result
END
You can then access this using the following code:
int result = db.checkWorkerCodeAvailibility(Int32.Parse(WCode));