Ejemplo n.º 1
0
 static public Staff Insert(Staff entity)
 {
     using (var update = PersistentStoreRegistry.GetDefaultStore().OpenUpdateContext(UpdateContextSyncMode.Flush))
     {
         Staff newEntity = Insert(update, entity);
         update.Commit();
         return newEntity;
     }
 }
Ejemplo n.º 2
0
 static public Staff Insert(IUpdateContext update, Staff entity)
 {
     var broker = update.GetBroker<IStaffEntityBroker>();
     var updateColumns = new StaffUpdateColumns();
     updateColumns.ServerPartitionKey = entity.ServerPartitionKey;
     updateColumns.Identifier = entity.Identifier;
     updateColumns.Name = entity.Name;
     Staff newEntity = broker.Insert(updateColumns);
     return newEntity;
 }