CommandType.Text vs CommandType.StoredProcedure

后端 未结 2 2055
耶瑟儿~
耶瑟儿~ 2020-12-03 08:31

Is there any benefit to explicitly using the StoredProcedure CommandType as opposed to just using a Text Command? In other words, is

cmd = new SqlCommand(\"         


        
2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-03 08:39

    It's cleaner.

    You're calling a stored procedure, why not just use the CommandType.StoredProcedure?

提交回复
热议问题