Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/267.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 什么';是LINQ中存储过程的自动生成和特定返回类型之间的不同_C#_Linq_Datagridview - Fatal编程技术网

C# 什么';是LINQ中存储过程的自动生成和特定返回类型之间的不同

C# 什么';是LINQ中存储过程的自动生成和特定返回类型之间的不同,c#,linq,datagridview,C#,Linq,Datagridview,我有一个存储过程Get_All_Customers,它从Customers表中选择4列。结果显示在DataGridView中 调用存储过程时有两种情况: 当返回类型不能自动生成时: DataGridView将包含存储过程选择的4列 当退货类型是特定的(客户)时: DataGridView将包含5列(不是存储过程选择的4列) 请始终提供问题的解决方案。此外,请描述您已经尝试的内容。这是关键:SP不知道它返回客户数据,它只知道它返回有4个字段的行。因此,自动生成的类型不知道原始表中的第五个

我有一个存储过程
Get_All_Customers
,它从
Customers
表中选择4列。结果显示在
DataGridView

调用存储过程时有两种情况:

  • 当返回类型不能自动生成时:

    • DataGridView
      将包含存储过程选择的4列
  • 当退货类型是特定的(
    客户
    )时:

    • DataGridView
      将包含5列(不是存储过程选择的4列)

请始终提供问题的解决方案。此外,请描述您已经尝试的内容。这是关键:SP不知道它返回客户数据,它只知道它返回有4个字段的行。因此,自动生成的类型不知道原始表中的第五个字段。什么是客户返回,为什么它返回5个字段???它不知道。客户恰好有5个属性,只有4个由SP填充。第五个属性可能显示其默认值。