를 목록으로의 DataTable은 <T> 변환 문제를
Constructor on type 'Northwind.BO.Products' not found.
하지만 난 이미 내 Products
클래스의 생성자를 선언 한 것을 알고있다.
public class Products
{
private int _ProductID;
[DataMapping("ProductID", -99)]
public int ProductID
{
get { return _ProductID; }
set
{
if (_ProductID <= 0)
{
_ProductID = value;
}
else
{
throw new Exception("ID should not be set manually!");
}
}
}
private string _ProductName;
[DataMapping("ProductName", "")]
public string ProductName
{
get { return _ProductName; }
set { _ProductName = value;}
}
private int _SupplierID;
[DataMapping("SupplierID", -99)]
public int SupplierID
{
get { return _SupplierID; }
set { _SupplierID = value;}
}
private int _CategoryID;
[DataMapping("CategoryID", -99)]
public int CategoryID
{
get { return _CategoryID; }
set { _CategoryID = value;}
}
private string _QuantityPerUnit;
[DataMapping("QuantityPerUnit", "")]
public string QuantityPerUnit
{
get { return _QuantityPerUnit; }
set { _QuantityPerUnit = value;}
}
private decimal _UnitPrice;
[DataMapping("UnitPrice", -99.99)]
public decimal UnitPrice
{
get { return _UnitPrice; }
set { _UnitPrice = value;}
}
private short _UnitsInStock;
[DataMapping("UnitsInStock", -99)]
public short UnitsInStock
{
get { return _UnitsInStock; }
set { _UnitsInStock = value;}
}
private short _UnitsOnOrder;
[DataMapping("UnitsOnOrder", -99)]
public short UnitsOnOrder
{
get { return _UnitsOnOrder; }
set { _UnitsOnOrder = value;}
}
private short _ReorderLevel;
[DataMapping("ReorderLevel", -99)]
public short ReorderLevel
{
get { return _ReorderLevel; }
set { _ReorderLevel = value;}
}
private bool _Discontinued;
[DataMapping("Discontinued", false)]
public bool Discontinued
{
get { return _Discontinued; }
set { _Discontinued = value;}
}
public Products(object[] args)
{
}
public Products()
{
}
'Northwind.BO.Products'의 생성자는 어떻게 생겼습니까? 생성자는 찾을 args와 일치해야합니다. – dtb