Beispiel #1
0
        internal bool IsIdentityKeyIdEmpty(object entity)
        {
            if (Columns.Where(p => p.Value.IsPrimaryKey && p.Value.PrimaryKeyInfo.IsIdentity).Count() == 0)
            {
                return(true);
            }

            ColumnAttribute pkIdentityCol = Columns.Where(p => p.Value.IsPrimaryKey && p.Value.PrimaryKeyInfo.IsIdentity).Select(p => p.Value).FirstOrDefault();

            return(IsKeyFieldEmpty(pkIdentityCol.GetAction(entity), pkIdentityCol.Title));
        }
Beispiel #2
0
 internal object GetKeyId(object entity, ColumnAttribute pkColumn)
 {
     return(pkColumn.GetAction(entity));
 }
Beispiel #3
0
 internal bool IsKeyIdEmpty(object entity, ColumnAttribute pkColumn)
 {
     return(IsKeyFieldEmpty(pkColumn.GetAction(entity), pkColumn.Title));
 }