This is the method in my Model :
public IList<Customer> GetProfileCustomer(int id)
{
var list_customer = from c in DataContext.Customers
where c.ID == id
select c;
return list_customer.ToList();
}
And this is what I did in my controller :
public ActionResult ShowProfile()
{
List<CustomerModels> cus = new List<CustomerModels>();
return View();
}
I created the object cus to call the method GetProfileCustomer() in the model, but I cannot do that. When I write : cus.GetProfileCustomer, It is error.