Interface IValueConverter
Provides methods to convert a
Namespace: Paradigm.ORM.Data.Converters
Assembly: Paradigm.ORM.Data.dll
Syntax
public interface IValueConverter
Methods
| Improve this Doc View SourceConvertFrom(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. |
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.
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. |