0
我已經做了大量的搜索,但我還沒有找到一個簡單的方法來驗證通過WCF數據服務通過線路傳遞的EntityFramework 4.0實體。基本上,我想在客戶端上做些什麼,如:什麼是驗證EntityFramwork 4.0類的最佳方式?
Proxy.MyEntities entities = new Proxy.MyEntities(
new Uri("http://localhost:2679/Service.svc"));
Proxy.Vendor vendor = new Proxy.Vendor();
vendor.Code = "ABC/XYZ";
vendor.Status = "ACTIVE";
// I'd like to do something like the following:
vendor.Validate();
entities.AddToVendors(vendor);
entities.SaveChanges();
任何幫助,在這方面將不勝感激!