A
Andrus
I have lot of columns in database like
Price Numeric(5,2)
Street Character(30)
For UI display and validation I need to retrieve width and for numeric
properties, decimal places of corresponding DbLinq property.
pgsqlmetal generates code for column properies without width and decimal
places like
[Column(Name = "price", DbType = "numeric", CanBeNull = false)]
public decimal Price {
....
Which is best way to obtain width and decimal places of property:
1. Is there standard attributes which can be added to property ?
2. Should DbType attibute be DbType = "numeric(5,2)" or
DbType="character(30)" ?
3. Should I query database metadata directly using ADO .NET ?
Andrus.
Price Numeric(5,2)
Street Character(30)
For UI display and validation I need to retrieve width and for numeric
properties, decimal places of corresponding DbLinq property.
pgsqlmetal generates code for column properies without width and decimal
places like
[Column(Name = "price", DbType = "numeric", CanBeNull = false)]
public decimal Price {
....
Which is best way to obtain width and decimal places of property:
1. Is there standard attributes which can be added to property ?
2. Should DbType attibute be DbType = "numeric(5,2)" or
DbType="character(30)" ?
3. Should I query database metadata directly using ADO .NET ?
Andrus.