自动执行存储过程/功能导入 [英] Automate stored procedure/function import
问题描述
由于合理的命名约定,我知道哪些存储过程返回结果集(因此有人需要)决定他们返回的实体或复杂类型,以及哪些不返回任何内容。我想自动导入那些
Thanks to a sensible naming convention I know which stored procedures return a resultset (and therefore someone needs to decide what entity or complex type they return) and which ones don't return anything. I'd like to import those
automaticaly. I already have a Visual Studio extension with an OnAfterModelUpdated handler, but I can't a method I could call to "import stored procedure foo as method named foo returning nothing". I can change the edmx myself and add the mapping and the <FunctionImportMapping>
and <FunctionImport>, but then I don't know the mapping of all those database types to .Net types.   ; 如果有办法显示"添加功能导入"在"从数据库更新模型"之后自动执行所有未映射过程的向导我也很感兴趣。 If there is a way to show the "Add Function Import" automatically after the "Update model from database" wizard for all unmapped procedures I'm also interested. 你好, 目前,没有。您必须手动将存储的procedureudre添加为函数import。假设您更新了模型并添加了多个存储过程,并且每个都返回不同的实体集合,或者其中一些不返回任何内容,如何将它们添加为 Currently, no. You have to manually add the stored procedudre as function import. Suppose you updated the model and add multiple stored procedure and each returns different entity collection or some of them do not return anything, how can you add them as
function import? " ;但后来我不知道所有这些数据库类型到.Net类型的映射。" "but then I don't know the mapping of all those database types to .Net types." 问候, 这篇关于自动执行存储过程/功能导入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
。我已经有一个带有OnAfterModelUpdated处理程序的Visual Studio扩展,但是我不能调用"将存储过程foo导入为名为foo的方法返回任何内容"的方法。我可以自己更改edmx并添加映射和< FunctionImportMapping>
和< FunctionImport>,但后来我不知道所有这些数据库类型到.Net类型的映射。推荐答案
函数导入?
请查看此列表:
http://msdn.microsoft.com/en-us/library/ms131092(SQL.90)。 aspx
Please take a look at this list:
http://msdn.microsoft.com/en-us/library/ms131092(SQL.90).aspx