public KeyValuePair <T, T> NextNumberRange(string key) { IDRange idRange = this.idRangeRepository.GetNextRange(key); return(new KeyValuePair <T, T>( TypeConvertor <T> .GetValue( idRange.StartRange.ToString()), TypeConvertor <T> .GetValue(idRange.EndRange.ToString()))); }
private static decimal TypeCastDecimalValue(object value) { decimal retValue = 0; if (null != value && value != DBNull.Value) { retValue = (typeof(decimal) == value.GetType()) ? (decimal)value : TypeConvertor <decimal> .GetValue(value.ToString()); } return(retValue); }