简体   繁体   English

实体框架更新向导仅显示系统文件夹中的存储过程

[英]Entity Framework update wizard only showing stored procedures in system folder

  • I created a stored procedure in sql server called dbo.GetDrugSetHistory 我在名为dbo.GetDrugSetHistory的sql server中创建了一个存储过程
  • I tested the SP, works fine. 我测试了SP,工作正常。
  • I went into my .edmx file and right clicked, then clicked "update Model from Database..." 我进入我的.edmx文件,右键单击,然后单击“从数据库更新模型...”。
  • I am unable to click the checkbox that says "Stored Procedures and Functions", the checkbox at the bottom that says "Import selected stored procedures and functions into the entity model" is greyed out and not selectable. 我无法单击显示为“存储过程和函数”的复选框,底部显示为“将所选存储过程和函数导入到实体模型中”的复选框为灰色且不可选择。
  • I then click on the "Refresh" tab, and then click to expand "Stored Procedures and Functions", below this I see one schema "dbo", when I click to expand "dbo", I only get the dbo procedures listed in the "System Stored Procedures" folder (ie fn_diagramobjects, sp_alterdiagram, etc.) 然后,我单击“刷新”选项卡,然后单击以展开“存储过程和函数”,在此之下我看到一个模式“ dbo”,当单击以展开“ dbo”时,我仅获得列在其中的dbo过程“系统存储过程”文件夹(即fn_diagramobjects,sp_alterdiagram等)

Does anyone know why I cannot see my newly created stored procedure? 有谁知道为什么我看不到我新创建的存储过程? Is this a permissions issue? 这是权限问题吗?

here is a copy of the stored procedure, just in case... 这是存储过程的副本,以防万一...

ALTER PROCEDURE [dbo].[GetDrugSetHistory] 
@ProfileID int
AS
BEGIN
SELECT distinct s.*
from Prescriptions p
LEFT JOIN Sets s ON p.SetID = s.SetID
where p.ProfileID = @ProfileID
END

OK, figured it out. 好,知道了。 It was a SQL Server permissions issue. 这是一个SQL Server权限问题。 Went into the user account properties and granted a bunch of permissions. 进入用户帐户属性并授予一堆权限。 The stored procedures now appear. 现在将显示存储过程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM