public static T NewEntity <T>() where T : class, IRepositoryEntity, IRepositoryCreatedEntity, new() { var entity = new T(); entity.SetId(IM.AllocID(entity.GetTableName(), 1, -1)); return(entity); }
public static void PutNextId(this IMRecordset recordset, string tableNmae, string fieldName) { recordset.Put(fieldName, IM.AllocID(tableNmae, 1, -1)); }