2010-04-09 28 views
1

我已经通过删除实体数据模型和域服务和元数据类来转换实体框架项目以使用POCO对象。使用WCF Ria与POCOS的Silverlight给编辑操作错误

我的silverlight项目工作,因为它显示了一个Employee对象的数据网格。

我现在已经添加到数据形,当我修改“名称”我的Employee对象之一的财产,我得到的错误:

这EntitySet的类型为“TestEmployeesApp.Web.Employee”不支持'编辑'操作。

错误发生在客户端的类实体的validatingProperty()上。

我检查了服务器端的元数据,并且我所有的属性都具有Editable(true)属性。

我在VS2008上使用Silverlight 3。

JD

回答

1

由于此链接:RIA Services EntitySet does not support 'Edit' operation,我把我的域名服务的更新方法属性[更新]。

在客户端生成的代码我现在有:

internal sealed class NorthwindDomainContextEntityContainer : EntityContainer 
    { 

     public NorthwindDomainContextEntityContainer() 
     { 
      this.CreateEntitySet<Employee>((EntitySetOperations.Add | EntitySetOperations.Edit)); 
     } 
    } 

所以现在我的POCO域服务类是一个普通的.NET类,从的DomainService下降和对更新方法的属性[更新]。

JD