You need to specify the
ref
modifier when you pass the parameter in, but you don't re-state the argument types.
Also, arguments passed as
ref
or
out
must match the declared type exactly. You can't pass a
ref int
to a
ref int?
parameter, so you'll to use need a temporary local variable.
Try this:
int? thePublishDate = PublishDate;
return Bta.InsertBook(BookName, Description, Price, Publisher, Category, ref thePublishDate);