日期:2014-05-20  浏览次数:20874 次

关于CreateDatabase。。。

public class NewCreateDB : DataContext
{
    public Table<Person> Persons;     
       public NewCreateDB(string connection) : base(connection)     
       {     }     
       public NewCreateDB(System.Data.IDbConnection connection) : base(connection)    
       {     }     
}     
[Table(Name = "Person")]     
public partial class Person : INotifyPropertyChanged     
{     
    private int _PersonID;     
    private string _PersonName;    
    private System.Nullable<int> _Age;     
    public Person() 
    { }     
    [Column(Storage = "_PersonID", DbType = "INT", IsPrimaryKey = true)]     
    public int PersonID     
    {     
        get 
        { return this._PersonID; }     
        set     
        {     
            if ((this._PersonID != value))     
            {     
                this.OnPropertyChanged("PersonID");     
                this._PersonID = value;      
                this.OnPropertyChanged("PersonID");    
                               
            }    
                          
        }    
                    
    }     
    [Column(Storage = "_PersonName", DbType = "NVarChar(30)")]     
    public string PersonName     
    {     
        get 
        { return this._PersonName; }     
        set     
        {     
            if ((this._PersonName != value))             
            {     
                this.OnPropertyChanged("PersonName");                
                this._PersonName = value;                 
                this.OnPropertyChanged("PersonName");                 
            }              
        }                   
    }     
    [Column(Storage = "_Age", DbType = "INT")]     
    public System.Nullable<int> Age     
    {     
        get 
        { return this._Age; }