2013-07-24 08:35:32 +03:00
|
|
|
using System.Data;
|
|
|
|
|
|
|
|
namespace Marr.Data.Mapping
|
2013-03-31 00:56:34 +03:00
|
|
|
{
|
|
|
|
public class ColumnInfo : IColumnInfo
|
|
|
|
{
|
|
|
|
public ColumnInfo()
|
|
|
|
{
|
|
|
|
IsPrimaryKey = false;
|
|
|
|
IsAutoIncrement = false;
|
|
|
|
ReturnValue = false;
|
2013-07-24 08:35:32 +03:00
|
|
|
ParamDirection = ParameterDirection.Input;
|
2013-03-31 00:56:34 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
public string AltName { get; set; }
|
|
|
|
public int Size { get; set; }
|
|
|
|
public bool IsPrimaryKey { get; set; }
|
|
|
|
public bool IsAutoIncrement { get; set; }
|
|
|
|
public bool ReturnValue { get; set; }
|
2013-07-24 08:35:32 +03:00
|
|
|
public ParameterDirection ParamDirection { get; set; }
|
2013-03-31 00:56:34 +03:00
|
|
|
|
|
|
|
public string TryGetAltName()
|
|
|
|
{
|
|
|
|
if (!string.IsNullOrEmpty(AltName) && AltName != Name)
|
|
|
|
{
|
|
|
|
return AltName;
|
|
|
|
}
|
2013-07-27 08:02:25 +03:00
|
|
|
return Name;
|
2013-03-31 00:56:34 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|