Show / Hide Table of Contents

Class ValueConverterBase

Provides methods to convert from database objects to .net types.

Inheritance
System.Object
ValueConverterBase
CqlValueConverter
MySqlValueConverter
PostgreSqlValueConverter
SqlValueConverter
Implements
IValueConverter
Namespace: Paradigm.ORM.Data.Converters
Assembly: Paradigm.ORM.Data.dll
Syntax
public abstract class ValueConverterBase : object, IValueConverter

Methods

| Improve this Doc View Source

ConvertFrom(Object, String)

Converts from a .net type to a database type.

Declaration
public virtual object ConvertFrom(object value, string dbType)
Parameters
Type Name Description
System.Object value

The value.

System.String dbType

The type.

Returns
Type Description
System.Object

Converted value.

| Improve this Doc View Source

ConvertTo(Object, Type)

Converts an object to a given .net type.

Declaration
public virtual object ConvertTo(object value, Type type)
Parameters
Type Name Description
System.Object value

The value to convert.

Type type

The type to convert to.

Returns
Type Description
System.Object

A value of the specified type.

Remarks

This method only works for native type codes.

| Improve this Doc View Source

ConvertTo<T>(Object)

Converts an object to a given .net type.

Declaration
public virtual T ConvertTo<T>(object value)
Parameters
Type Name Description
System.Object value

The value to convert.

Returns
Type Description
T

Converted value.

Type Parameters
Name Description
T

The type to convert to.

Implements

IValueConverter

Extension Methods

ObjectExtensions.ThrowIfFails<TException>(Object, Action, String)
ObjectExtensions.ThrowIfFails<TException, TResult>(Object, Func<TResult>, String)
ObjectExtensions.ThrowIfFailsAsync<TException>(Object, Func<Task>, String)
ObjectExtensions.ThrowIfFailsAsync<TException, TResult>(Object, Func<Task<TResult>>, String)

See Also

IValueConverter
  • Improve this Doc
  • View Source
Powered by MiracleDevs ©2017. Code licensed under the MIT License.
Documentation generated by DocFX.