Modifiy Dynamic Data DbType and DBSqlType

Posted by Community Admin on 03-Aug-2018 14:01

Modifiy Dynamic Data DbType and DBSqlType

All Replies

Posted by Community Admin on 16-Mar-2011 00:00

Hi.

I have created DynamicData following code,now i may want to change  MAX value instead of 255!  using API


 bool changedDB = false;
                        App.WorkWith().DynamicData().Type(typeof(Document))
                           .Field().TryCreateNew("Description", typeof(string), ref changedDB).Done()
                       .SaveChanges(true);


Thnks
Jmr

Posted by Community Admin on 22-Mar-2011 00:00

Hi Jmr,

You could use the following code:

bool changedDB = false;
 App.WorkWith().DynamicData().Type(typeof(Document))
    .Field()
     .TryCreateNew("Description11", typeof(string), refchangedDB)
     .Do(
         f =>
         
             f.DBType = "LONGVARCHAR";
             f.DBSqlType = "NAVARCHAR(MAX)";
         )
    .Done()
.SaveChanges(true);


Regards,
Radoslav Georgiev
the Telerik team

This thread is closed