dbset object of one model in controller of different model

34 Views Asked by At

New to MVC framework. I am getting below error when i am trying to pass dbset object of one model in controller of different model.

below is the code

public ActionResult Create()
{
    
    return View(db.designations.ToList());
}

Create action is of employee model where as db.designation.tolist() belongs to designation model.

0

There are 0 best solutions below