2017-06-23 12 views
0

私は逆POCOジェネレータを使用して、データベースをモデルに渡します。ストアドプロシージャを追加しましたが、どこにも見つからず、Entity Frameworkを使用して呼び出す方法がわかりません。リバースPOCOジェネレータを使用してストアドプロシージャを呼び出す

.tt configファイルにIncludeStoredProcedures = true;IncludeTableValuedFunctions = true;が設定されています。そこコンソールにはエラーや警告が保存打った後でないと、ストアドプロシージャの設定は以下の通りです:

// Stored Procedures ****************************************************************************************************************** 
    // Use the following regex filters to include or exclude stored procedures 
    StoredProcedureFilterExclude = null; 
    StoredProcedureFilterInclude = null; 

    // Filtering of stored procedures using a function. This can be used in conjunction with the Regex's above. 
    // Regex are used first to filter the list down, then this function is run last. 
    // Return true to include the stored procedure, return false to exclude it. 
    StoredProcedureFilter = (StoredProcedure sp) => 
    { 
     // Example: Exclude any stored procedure in dbo schema with "order" in its name. 
     //if(sp.Schema.Equals("dbo", StringComparison.InvariantCultureIgnoreCase) && sp.NameHumanCase.ToLowerInvariant().Contains("order")) 
     // return false; 

     return true; 
    }; 

this questionからの私の理解では、私のストアドプロシージャは、任意のデータを返すが、挿入が完了していないので、それが勝ったということですPOCOで転送することはできません。そうですか?もしそうなら、これには何らかの方法がありますか?

答えて

0

私は同じ問題を抱えていると私のために、私は(ちょうどSET NOCOUNT ON後)ストアドプロシージャの上部にSET FMTONLY OFFを挿入すると、この問題を解決

関連する問題