Exemplo n.º 1
0
        protected static object GetPrimaryKeyValue(TEntity entity)
        {
            #region Validation
            if (entity == null)
            {
                throw new ArgumentNullException("entity");
            }
            #endregion

            return(PrimaryKey.GetValue(entity, null));
        }
Exemplo n.º 2
0
 public Guid?GetPrimaryKeyValueAsGuid(object obj)
 {
     return((Guid?)PrimaryKey.GetValue(obj));
 }
Exemplo n.º 3
0
 public long?GetPrimaryKeyValueAsLong(object obj)
 {
     return(obj is Enum ? (long)obj : (long?)PrimaryKey.GetValue(obj));
 }
Exemplo n.º 4
0
 public int?GetPrimaryKeyValueAsInt(object obj)
 {
     return(obj is Enum ? (int)obj : (int?)PrimaryKey.GetValue(obj));
 }
Exemplo n.º 5
0
 public object GetPrimaryKeyValueAsObject(object obj)
 {
     return(obj is Enum ? (int)obj : PrimaryKey.GetValue(obj));
 }