Set Default Value in Table without Process() on Server Side?

Set Default Value in Table without Process() on Server Side?

terinfireterinfire Posts: 8Questions: 3Answers: 0
edited May 19 in Free community support

I've been looking -- is it possible to set a value/update a table without using an HttpRequest?

I'm trying to make my data model work around DT's structure -- and I'd like to try to make a somewhat consistent model over everything.

The idea would be something like:

new Editor(db, "datatables_demo")
                    .Model<StaffModel>()
                    .Field(new Field("first_name").Set("bob"))
                    .Save();

Or something akin to this, wherein the StaffModel table would have a new item sent across with the first_name "bob".

I've used a bit of reflection and it looks like you can do a KeyValuePair<string, string> going across -- but do we need any special identifiers to make sure it is read correctly?

Answers

  • allanallan Posts: 49,501Questions: 1Answers: 7,285 Site admin

    The "models" used by Editor are used only to get the property names. They aren't actually populated into the model.

    That said, I don't fully understand your question I'm afraid:

    Or something akin to this, wherein the StaffModel table would have a new item sent across with the first_name "bob".

    Could you elaborate on this?

    Allan

Sign In or Register to comment.