Setting a default value can be configured via the DefaultValue option in the DataSource Model configuration. My Code would look similar to this:
.DataSource(dataSource => dataSource
.WebApi()
.Create(create => create.Action("Create", "Home"))
.Update(update => update.Action("Update", "Home"))
.Read(read => read.Action("Read", "Home"))
.Model(m => {
m.Id(id => id.Id);
m.Field(f => f.Name).DefaultValue("test");
})
)
After I click on the "Add new record" button, the new row can display,but Name cann't display "test". why?
.DataSource(dataSource => dataSource
.WebApi()
.Create(create => create.Action("Create", "Home"))
.Update(update => update.Action("Update", "Home"))
.Read(read => read.Action("Read", "Home"))
.Model(m => {
m.Id(id => id.Id);
m.Field(f => f.Name).DefaultValue("test");
})
)
After I click on the "Add new record" button, the new row can display,but Name cann't display "test". why?