Add a table to ADO.NET Entity Data Model RRS feed

  • Question

  • I experimented to add a table to Ado.Net Entity Data Model & comes with the below scenario

       1.The table must have minimum one column with  " not null " constraint

    Otherwise the table can't be added to your Data Model  &

    "Error 6013: The table/view 'MBSDATA.dbo.ARMConvCode' does not have a primary key defined
    and no valid primary key could be inferred.
    This table/view has been excluded. To use the entity, you will need to review your schema,
    add the correct keys, and uncomment it." will be thrown

    If this article is helpful for u then leave your comments


    For now thats all from my side. If any one get any other solution then please inform me on jkumarsahoo@gmail.com




    Wednesday, June 8, 2011 3:54 AM


All replies

  • Table Must Contains One Primary Key.. add Primary Key to Table and Add it Again

    Wednesday, June 8, 2011 6:19 AM
  • OK I Know this & without primary key it also working.


     If I hav composite primary key on 2 columns & one of the column among them(primary key column) contains no values( don't think null, it is only spaces(as space is a character)).

    I'm using Domain Service class.

    If I reorder the primary key definition then  it shows different data on my silverlight page(but in both cases the space containg column gets the preference first & shows rows containing the spaces first).

    I think what ever the order may be , it gives precedence to the "space"

    So I'm confusing now. Think u will understand what I want to say.

    Let me know otherwise I will clarify again more elaborately with the demo data


    Wednesday, June 8, 2011 10:24 AM
  • Hi,

    I think that's a database table design issue, but not a Silverlight issue.

    Please goto this forum to find more help.


    Thursday, June 9, 2011 11:59 PM