static public CannedText Load(IPersistenceContext read, ServerEntityKey key) { var broker = read.GetBroker <ICannedTextEntityBroker>(); CannedText theObject = broker.Load(key); return(theObject); }
static public CannedText Insert(CannedText entity) { using (var update = PersistentStoreRegistry.GetDefaultStore().OpenUpdateContext(UpdateContextSyncMode.Flush)) { CannedText newEntity = Insert(update, entity); update.Commit(); return(newEntity); } }
static public CannedText Insert(IUpdateContext update, CannedText entity) { var broker = update.GetBroker <ICannedTextEntityBroker>(); var updateColumns = new CannedTextUpdateColumns(); updateColumns.Label = entity.Label; updateColumns.Category = entity.Category; updateColumns.Text = entity.Text; CannedText newEntity = broker.Insert(updateColumns); return(newEntity); }