public Logindetails(DataRow row) { // Assign default persister to instance persister _Persister = _DefaultPersister; // Assign column values to private members for (int i = 0; i < row.Table.Columns.Count; i++) { switch (row.Table.Columns[i].ColumnName.ToUpper()) { case "ID": this.ID = Convert.ToInt32(row[i, DataRowVersion.Current]); break; case "NAME": this.Name = (string)row[i, DataRowVersion.Current]; break; case "EMAILADDRESS": this.Emailaddress = (string)row[i, DataRowVersion.Current]; break; case "PASSWORD": this.Password = (string)row[i, DataRowVersion.Current]; break; case "CREATEDON": this.createdon = Convert.ToDateTime(row[i, DataRowVersion.Current]); break; } } }
public Logindetails() { // Assign default persister to instance persister _Persister = _DefaultPersister; }
static Logindetails() { // Assign default persister _DefaultPersister = new SqlServerLogindetailsPersister(); }