我正在将asp.net mvc 5与mysql一起使用。我有一个存储过程,该过程需要3个参数并返回下面给出的3列
DELIMITER //
CREATE PROCEDURE ReportUsProjectWorkHours(IN userID INT(11), startDate VARCHAR(10), endDate VARCHAR(10))
BEGIN
SELECT tdd.tdd_day, ctd.ctd_name, tdd.workhours
FROM timesheet_day_details tdd
INNER JOIN timesheet_details tsd ON tdd.tsd_id = tsd.tsd_id
INNER JOIN category_type_details ctd ON tsd.tsd_category_type_id = ctd.ctd_id
INNER JOIN timesheets ts ON ts.timesheet_id = tsd.tsd_timesheet_id
WHERE tsd.tsd_category_id = (SELECT category_id
FROM categories
WHere category_name = "projects")
AND(tdd.tdd_day between startDate AND endDate)
AND ts.timesheet_user = userID#(SELECT user_id FROM users WHERE user = userID)
ORDER BY tdd.tdd_day ASC;
END //
DELIMITER;
在被称为CALL ReportUsProjectWorkHours(1, "2018/06/18", "2018/06/24");
我正在使用实体框架,当我导入模型函数时,将为存储过程导入复杂类型。现在,从“获取列信息”中可以看到应该返回的所有3列都在那儿,但是the complex type always end up being empty for some reason as seen here.
我尝试手动将它们添加到模型中,但这似乎不起作用。