none
Code First WCF Not Saving Data

    General discussion

  • Hi

    I am Using Code First Model With WCF RIA Services..

    When I add an Enity and Call Submit Changes Method

    The Entity Is Not Saved.. Still  odenot Shows Any Error

    I am Using Sql Server 2008 R2 and I have Identity Column the Entity..

    Some Times It is Saved and Some Times It is Not Saved...

    But It Doesent Returns Any Error.

    How to Handle This.

    I Tested With Changing The Entity Framework Dlls 4.1 and 4.3 But No Use..

    Sunday, March 11, 2012 7:50 AM

All replies

  • Please post some code here to show how you edit the data and submit changes.

    Monday, March 12, 2012 10:00 PM
  • Hi

    I Have a ViewModel In that I have Created a Entity type A and Assigning to Another ViewModel which has Declared as a Observable Collection prop in the ViewModel

    And i am changing the properties of Entity type A in the UI 

    and Finally i am adding the Entity Directly to the Context and fired Submit Changes..  After That alos the Entity Is Added in the Context with an identity of 0 and not adding.. it to database..

    Tuesday, March 13, 2012 12:55 AM
  • I think we need to see your code in the DomainService, your client side code isn't an issue as long as the new entities are making their way into the server side Insert method.

    Tuesday, March 13, 2012 10:36 AM