我正在创建一个基于SOA的应用程序,我已经使用Framework 4.0创建了WCF服务项目,因为我在WCF操作中使用实体框架合同方法我正在使用类由EF生成的,但WCF不能识别这些对象,当我在设计模式下检查这些类,它们就像在WCF中使用EF实体类
[EdmEntityTypeAttribute(NamespaceName="quizTestDBModel", Name="tbl_adminUser")]
[Serializable()]
[DataContractAttribute(IsReference=true)]
public partial class tbl_adminUser : EntityObject
{
#region Factory Method
/// <summary>
/// Create a new tbl_adminUser object.
/// </summary>
/// <param name="adminUserId">Initial value of the adminUserId property.</param>
public static tbl_adminUser Createtbl_adminUser(global::System.Int32 adminUserId, global::System.String name, global::System.String userid, global::System.String password)
{
tbl_adminUser tbl_adminUser = new tbl_adminUser();
tbl_adminUser.adminUserId = adminUserId;
return tbl_adminUser;
}
#endregion
#region Primitive Properties
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Int32 adminUserId
{
get
{
return _adminUserId;
}
set
{
if (_adminUserId != value)
{
OnadminUserIdChanging(value);
ReportPropertyChanging("adminUserId");
_adminUserId = StructuralObject.SetValidValue(value);
ReportPropertyChanged("adminUserId");
OnadminUserIdChanged();
}
}
}
private global::System.Int32 _adminUserId;
partial void OnadminUserIdChanging(global::System.Int32 value);
partial void OnadminUserIdChanged();
#endregion
}
当我使用这个类在我的作业合同
int adminRegister(tbl_adminUser _adminUser);
它给出了该方法的错误,“该操作在WCF Test Client中不受支持,因为它使用tbl类型_adminUser”
感谢
我不想为映射创建额外的类,我想在我的操作合约中使用tbl_adminUser,谢谢 – MZH