Lokesh K

Lokesh K

  • NA
  • 148
  • 41.5k

Anonymous type error

Sep 29 2017 3:11 PM
Hi,
While returning data it throws Anonymous types error like below mention code
 
public EncounterUserDto GetUserRolesByUserId(Guid userId)
{
var userRolesList = from u in _unitOfWork.Repository<User>().GetEntityAsQuerable()
join r in _unitOfWork.Repository<Role>().GetEntityAsQuerable()
on u.RoleId equals r.RoleId
select new
{
userRoleId = u.RoleId,
userUserId = u.UserId,
roleRoleId = r.RoleId,
roleValue = r.Value
};
return userRolesList;
}
while retun it throw as anonymous types error.
 
if anyone knows pls reply 
 

Answers (4)