public static ProductType GetById(int id) { using (ProductTypeServiceClient client = new ProductTypeServiceClient()) { return(new ProductType(client.GetProductTypeById(id))); } }
public static ProductType GetByCode(string code) { using (ProductTypeServiceClient client = new ProductTypeServiceClient()) { return(new ProductType(client.GetProductTypeByCode(code))); } }
public ProductType() { using (ProductTypeServiceClient client = new ProductTypeServiceClient()) { Proxy = client.CreateProductType(); client.Close(); } }