yash patel

yash patel

  • 1.8k
  • 136
  • 1.1k

getting error in list while displaying data in a single view

Sep 29 2020 3:04 AM
while creating list for both tables user and user address I m getting the below error for both the tables
 
Code Description Project File Line Suppression State Error CS0029 Cannot implicitly convert type 'System.Collections.Generic.List<nsroute.DataAccess.UserAddress>' to 'System.Collections.Generic.List<nsroute.UserAddress>'
 
controller:
  1. public ActionResult Dashboard()  
  2. {  
  3. nsrouteEntities obj = new nsrouteEntities();  
  4. List<User> userlist = obj.Users.ToList();  
  5. List<UserAddress> useraddresslist = obj.UserAddresses.ToList();  
  6. getting error in this bold text  
  7. return View();  
  8. }  
can anyone tell me on how to display data from multiple tables in a single table of a view in mvc5

Brought to you by:

Answers (1)