EntityFieldDefinition & Native DB type

Posts   
 
    
MatthewM
User
Posts: 78
Joined: 26-Jul-2006
# Posted on: 27-Sep-2006 21:50:50   

i need to know the native db type, specifically when it is ntext or xml and of course dotnettype is string..Thanks

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39786
Joined: 17-Aug-2003
# Posted on: 27-Sep-2006 23:20:41   

Moved to templatestudio/templates forum.

Frans Bouma | Lead developer LLBLGen Pro
worldspawn avatar
worldspawn
User
Posts: 321
Joined: 26-Aug-2006
# Posted on: 28-Sep-2006 00:54:44   

DBTableField dbField = (DBTableField)currentEntity.Fields[i].MappedField;
//currentEntity is of EntityDefinition

if (dbField.TypeDefinition.DBTypeAsString != "money")
 throw new NeedMoreMoneyException("Gimme Gimme");

and the dotnettype is from


currentField.DotNetType.Name;
//currentField is of type EntityFieldDefinition

MatthewM
User
Posts: 78
Joined: 26-Jul-2006
# Posted on: 28-Sep-2006 18:53:33   

Groovy thanks