C# code which calls sql scripts:
var result = dbContext.QueryScript<Guid>(x => "path to script is here", args.ToArray());
1 Script code:
SELECT [UID] FROM @functionName(@userId, @isMobile)
How to pass [dbo].[fn_SQLFunctionName] function to this script, following way doesn't work:
args.Add(new SqlParameter("functionName", "[dbo].[fn_SQLFunctionName]")) ;
2. Script code:
SELECT * FROM @tableName
How to pass [dbo].[Users] table to this script, following way doesn't work:
args.Add(new SqlParameter("tableName", "[dbo].[Users]")) ;