My code works fine in asp.net mvc5,when i used the same code in . .netcore 3.1, the entity is not supported,plz help
- public ActionResult AddOrEdit(int id = 0)
- {
- SELECTEDEMPLOYEE emp = new SELECTEDEMPLOYEE();
- using (Entities db = new Entities())
- {
- if (id != 0)
- {
- emp = db.SELECTEDEMPLOYEEs.Where(x => x.ID == id).FirstOrDefault();
- emp.SelectedIDArray = emp.SELECTEDEMPLOYEEIDS.Split(',').ToArray();
- }
- emp.EmployeeCollection = db.VIEW_USER.ToList();
- }
- return View(emp);
- }