protected static object GetPrimaryKeyValue(TEntity entity) { #region Validation if (entity == null) { throw new ArgumentNullException("entity"); } #endregion return(PrimaryKey.GetValue(entity, null)); }
public Guid?GetPrimaryKeyValueAsGuid(object obj) { return((Guid?)PrimaryKey.GetValue(obj)); }
public long?GetPrimaryKeyValueAsLong(object obj) { return(obj is Enum ? (long)obj : (long?)PrimaryKey.GetValue(obj)); }
public int?GetPrimaryKeyValueAsInt(object obj) { return(obj is Enum ? (int)obj : (int?)PrimaryKey.GetValue(obj)); }
public object GetPrimaryKeyValueAsObject(object obj) { return(obj is Enum ? (int)obj : PrimaryKey.GetValue(obj)); }