arun sahani

arun sahani

  • NA
  • 379
  • 0

Entity equivalent in .netcore ?

Jun 15 2020 1:18 PM
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
  1. public ActionResult AddOrEdit(int id = 0)  
  2. {  
  3. SELECTEDEMPLOYEE emp = new SELECTEDEMPLOYEE();  
  4. using (Entities db = new Entities())  
  5. {  
  6. if (id != 0)  
  7. {  
  8. emp = db.SELECTEDEMPLOYEEs.Where(x => x.ID == id).FirstOrDefault();  
  9. emp.SelectedIDArray = emp.SELECTEDEMPLOYEEIDS.Split(',').ToArray();  
  10. }  
  11. emp.EmployeeCollection = db.VIEW_USER.ToList();  
  12. }  
  13. return View(emp);  
  14. }  

Answers (1)