2011-04-18 6 views
0

こんにちは、私はエンティティフレームワークでエラーがあります。私はsp get()をEFにインポートし、結果を複雑なデータ型 'GetResult'として返します。edmx xmlでは、 'Amount'型を10進数に設定しました。エンティティフレームワークエラーでの関数インポート

<ComplexType Name="Get_Result"> 
      <Property Type="String" Name="Description" Nullable="true" MaxLength="255" /> 
      <Property Type="Decimal" Name="Amount" Nullable="false" /> 
      <Property Type="Decimal" Name="Gst" Nullable="false" Precision="19" /> 
      <Property Type="Decimal" Name="Total" Nullable="true" Precision="19" /> 
     </ComplexType> 

私はそれが私にこのようなエラーメッセージを与え続けたDataGridView

gridview.DataSource = db.Get().ToList(); 

と結果をバインドしてみてください。私はint32をEF内のどこにも見つけることができず、&をEFを複数回更新しました。

The 'Amount' property on 'Get_Result' could not be set to a 'Int32' value. You must set this property to a non-null value of type 'Decimal'. 

任意の助けを感謝...

答えて

0

がnull例外

を扱うことで問題を解決しました
関連する問題