I have a stored procedure in sql which has a bit parameter.I need to pass the parameter value from c#.Can Someone help me how to do it. I passed true/false value to the bit parameter but it is not working.
CREATE PROCEDURE checkbit
@id varchar(10),
@IsDeleted bit
AS
BEGIN
IF(@IsDeleted = 1)
BEGIN
DELETE FROM tablename WHERE ID = @id
RETURN
END
END
My C# code
Im using entity framework.Checking for bit value here.
bool chk;
if(val==1)
chk=true;
else
chk=false;
context.checkbit(id,chk)