You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// New in 0.9.12 - this is probably the exception not the rule, where ordinarily better to assume audit fields *will* be first class props on biz objs; but we support the option to not be
// Let's assume people has been handed back to a client now - it's not dirty. Let's create a data table from it. Try visualizing the dt variable in VS.
490
+
vardt=people.DeepCopyDataTable();
491
+
Assert.IsTrue(dt.Rows.Count==3);
492
+
493
+
// Let's make a few changes - an insert, update and a delete using the dt
494
+
dt.Rows[1]["Age"]=22;
495
+
dt.Rows[0].Delete();
496
+
varnr=dt.NewRow();
497
+
nr["Age"]=40;
498
+
nr["Gender"]="F";
499
+
nr["Name"]="Bobby Tables";
500
+
dt.Rows.Add(nr);
501
+
502
+
// Now let's assume you wanted to package up the change to go to a server... sending it back as entity, not dt
// Now let's assume we're applying updates, while on the server, back to our data, to get saved... does the row states imply 1 insert, 1 update and 1 delete? it should!
// For non-persisted, we can look 1 level deeper to identify nested props as well - we iterate properties that belong to the same assembly as the root object
// Support idea of globally excluded properties (i.e. should never persist since might be things like EMailAddressPlain which is just a surrogate for encrypted EMailAddress)
0 commit comments