Entity Frameworkに実行のタイムアウト時間を追加

1311 ワード

クラスの一部を書くことができます
public partial class eBuulMCEntities 



{ 



    public eBuulMCEntities(int? commandTimeout)  : base("name=eBuulMCEntities")       



    {             // Get the ObjectContext related to this DbContext             



                 var objectContext = (this as IObjectContextAdapter).ObjectContext; 



                 // Sets the command timeout for all the commands             



                 objectContext.CommandTimeout = commandTimeout;      



     }  



}