这是我的 WCF 服务中操作的实现。对象_members是一个 EF。 QueryConstraint是一种数据契约,它存储数据Where并将OrderBy其应用于使用 Dynamic Linq 的枚举:
public IEnumerable<CustomersDC> GetCustomers(QueryConstraint a_constraint)
{
var customers = from customer in _members.Customers
select new CustomersDC
{
CustomerID = customer.ID,
Email = customer.Email,
FirstName = customer.FirstName,
LastName = customer.LastName,
IsEmailVerified = customer.EmailVerified,
AccountingID = customer.AccountingID,
IsTaxExempt = customer.TaxExempt
};
return customers.Apply(a_constraint);
}
该字段AccountingID是另一个数据库的保留。因此nchar,我想在服务中对其进行修剪。有没有办法我可以做到这一点?
谢谢。