i am getting an error on DuplicateOrder(TestOrder) as "cannot convert from tables.Order to int" even though the OrderID in the Orders table is an int
void DuplicateOrder(int orderId)
{
string methodName = MethodBase.GetCurrentMethod().Name;
try {
using (MSBLegacyContext db = new MSBLegacyContext())
{
var TestOrder = db.Orders.Where(i=>i.OrderID == orderId).FirstOrDefault();
DuplicateOrder(TestOrder);
}
}
catch (Exception ex)
{
Console.WriteLine(methodName, ex, string.Format("Test", orderId));
}}
what am i missing here?