使用dapper,在mysql调用存储过程时,提示在数据库中找不到存储过程或函数

C# 使用dapper,在mysql调用存储过程时,提示在数据库中找不到存储过程或函数
一、创建存储过程

Delimiter $$
drop PROCEDURE if EXISTS pro_test;
create PROCEDURE pro_test(in idIn int)
begin
select count(1) as Count from tch_teacher where id > idIn;
end $$
Delimiter ;

Delimiter $$
drop PROCEDURE if EXISTS pro_test1;
create PROCEDURE pro_test1(in idIn int, out count int)
begin
select count(1) into count from tch_teacher where id > idIn;
select * from tch_teacher where id > idIn;
end $$
Delimiter ;

call pro_test(11);

set @count =0;
call pro_test1(11, @count);
select @count;

二、调用

//方法一
sql = "call pro_test(@id);";
var res = conn.Query<int>(sql, new { id = 15 }).FirstOrDefault();  //85
Console.WriteLine("res = " + res);  //res = 85

//方法二
var param = new DynamicParameters();
param.Add("@idIn", 20);
param.Add("@count", 0, DbType.Int32, ParameterDirection.Output);
var res2 = conn.Query<Tch_Teacher>("pro_test1", param, null, true, null, CommandType.StoredProcedure);//res2.Count = 80
Console.WriteLine("Query count = " + param.Get<object>("@count"));   //Query count = 80

看下是不是用的同一个用户连接的同一个数据库

哦,不存在这个问题。以这种方式去执行就可以:
sql = "call pro_test(@id);";
var res = conn.Query(sql, new { id = 15 }).FirstOrDefault();

不过我发现一奇怪的问题,就是说不能在"StudentDB."中不能找。不知为何在数据库后加点了

报错是这样的:
Procedure or function 'pro_test1' can not be found in database 'StudentDB'.