技术开发 频道

步步为营.NET三层架构之四种Model设计

  方式二:

  department.cs

public class department  

{  

    
public int id  

    
{  

        
set ;  

        
get;  

    }
  

    
public string departname  

    
{  

        
set ;  

        
get ;  

    }
  

    
public string description  

    
{  

        
set;  

        
get ;  

    }
  

}

  custom.cs:

public class custom  

{  

    
public string departname  

    
{  

        
set ;  

        
get;  

    }
  

    
public int id  

    
{  

        
set ;  

        
get;  

    }
  

    
public string cname  

    
{  

        
set ;  

        
get;  

    }
  

    
public string ename  

    
{  

        
set;  

        
get ;  

    }
  

    
public int departID  

    
{  

        
set;  

        
get ;  

    }
  

    
public int age  

    
{  

        
set;  

        
get;  

    }
  

    
public string password  

    
{  

        
set ;  

        
get;  

    }
  

}

  也可采用如下这种方式创建:

0
相关文章