RIA Services EntitySet does not support 'Edit' operation

前端 未结 1 951
误落风尘
误落风尘 2021-01-03 22:29

Making my first steps in RIA Services (VS2010Beta2) and i encountered this problem: created an EF Model (no POCOs), generic repository on top of it and a RIA Service(hosted

相关标签:
1条回答
  • 2021-01-03 23:22

    It turns out that in the DomainService class one has to implement (or at least to mark "placeholder methods") as "Edit", "Delete",... eg

    [Delete]
    public void DeleteCulture(Culture currentCulture)
    {
       throw new NotImplementedException("UpdateCulture not Implemented yet");
    }
    [Insert]
    public void InsertCulture(Culture newCulture)
    {
       throw new NotImplementedException("InsertCulture not Implemented yet");
    }
    

    This way the OrganizationDomainContextEntityContainer class creates an EntitySet with parameter EntitySetOperations.All (meaning that all the CUD operations are available).

    Hope it's useful for someone in the future!

    0 讨论(0)
提交回复
热议问题