Catnap.Database.Types.DefaultType.ToDb C# (CSharp) Method

ToDb() public method

public ToDb ( object value ) : object
value object
return object
        public object ToDb(object value)
        {
            if (value == null)
            {
                return null;
            }
            var underlyingType = value.GetType().GetUnderlyingGenericType();
            return underlyingType.IsEnum
                ? (int)value
                : value;
        }
DefaultType