Consider the below example:
CREATE FUNCTION RemoveMe
(
)
RETURNS TABLE
AS
RETURN
(
select * from dbo.xxxx
)
In order to run the above function, a standard T-SQL statement would be:
select * from RemoveMe()
Therefore, in order to run it from C#, you would have to run a sql query as CommandType.Text by building the query along with parameters like
select * from RemoveMe(param1, param2...)
or build a stored procedure to call the table valued function and pass the parameters to the stored procedure.
Hope this help.
Regards,
Nayan