public static Contractor GetByPhone(string phone) { using (ContractorServiceClient client = new ContractorServiceClient()) { return(new Contractor(client.GetContractorByPhone(phone))); } }
public static Contractor GetById(int id) { using (ContractorServiceClient client = new ContractorServiceClient()) { return(new Contractor(client.GetContractorById(id))); } }
public static Contractor GetByName(string name) { using (ContractorServiceClient client = new ContractorServiceClient()) { return(new Contractor(client.GetContractorByName(name))); } }
public Contractor() { using (ContractorServiceClient client = new ContractorServiceClient()) { Proxy = client.CreateContractor(); client.Close(); } }