使用微软企业库-策略注入
using System;
using System.Data;
//
using Microsoft.Practices.EnterpriseLibrary.PolicyInjection;
using Microsoft.Practices.EnterpriseLibrary.Validation.Validators;
/// <summary>
///使用微软企业库-策略注入
/// </summary>
public class EnterprisePolicyInjection
{
    public EnterprisePolicyInjection()
    {
    }
    //使用策略注入验证字段值
    //[ValidationCallHandler] 
    public DataRow[] GetCustomerDetails(
           [StringLengthValidator(5, RangeBoundaryType.Inclusive,
            5, RangeBoundaryType.Inclusive)] String customerID)
    {
        DataRow[] dr = (new DataTable()).Select();
        return dr;
    }
}
 
                    
                     
                    
                 
                    
                 
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号