Can you help me please,
I have this error message
"No overload for method 'GetDataByClass Type'takes '1' arguments"
private void button7_Click(o bject sender, EventArgs e)
{
string connString = @"Data Source=.;Initia l
Catalog=Northwi nd;Integrated Security=True";
DataClasses1Dat aContext dc = new
DataClasses1Dat aContext(connSt ring);
Table<Customerc ustom = dc.Customers;
// *****This row is wrong,
dataGridView1.D ataSource =
GetDataByClassT ype<Customer>(c ustom)();
//No overload for method 'GetDataByClass Type'takes
'1' arguments
}
public List<TGetDataBy ClassType<T>() where T : class
{
string connString = @"Data Source=MUSTAFAC ;Initial
Catalog=Northwi nd;Integrated Security=True";
DataClasses1Dat aContext dc = new
DataClasses1Dat aContext(connSt ring);
return Enumerable.ToLi st<T>(dc.GetTab le<T>());
}
I have this error message
"No overload for method 'GetDataByClass Type'takes '1' arguments"
private void button7_Click(o bject sender, EventArgs e)
{
string connString = @"Data Source=.;Initia l
Catalog=Northwi nd;Integrated Security=True";
DataClasses1Dat aContext dc = new
DataClasses1Dat aContext(connSt ring);
Table<Customerc ustom = dc.Customers;
// *****This row is wrong,
dataGridView1.D ataSource =
GetDataByClassT ype<Customer>(c ustom)();
//No overload for method 'GetDataByClass Type'takes
'1' arguments
}
public List<TGetDataBy ClassType<T>() where T : class
{
string connString = @"Data Source=MUSTAFAC ;Initial
Catalog=Northwi nd;Integrated Security=True";
DataClasses1Dat aContext dc = new
DataClasses1Dat aContext(connSt ring);
return Enumerable.ToLi st<T>(dc.GetTab le<T>());
}
Comment