Show / Hide Table of Contents

Interface IValueConverter

Provides methods to convert a to other native types.

Namespace: Paradigm.ORM.Data.Converters
Assembly: Paradigm.ORM.Data.dll
Syntax
public interface IValueConverter

Methods

| Improve this Doc View Source

ConvertFrom(Object, String)

Converts from a .net type to a database type.

Declaration
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
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
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.

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)
  • Improve this Doc
  • View Source
Powered by MiracleDevs ©2017. Code licensed under the MIT License.
Documentation generated by DocFX.