public static ProductType GetByCode(string code) { using (ProductTypeServiceClient client = new ProductTypeServiceClient()) { return(new ProductType(client.GetProductTypeByCode(code))); } }