Click here to Skip to main content
15,889,931 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi this is my tables class:
the table roles:
C#
public partial class Role
{
    public Role()
    {
        this.Users = new HashSet<User>();
    }

    public int RoleID { get; set; }
    public string RoleTitle { get; set; }
    public string RoleInsystem { get; set; }
    public virtual ICollection<User> Users { get; set; }
}

and the table users:
C#
public partial class User
   {
       public int UserID { get; set; }
       public int RoleID { get; set; }
       public string Username { get; set; }
       public string Password { get; set; }
       public virtual Role Role { get; set; }
   }


i want get this fiels:User.* and Role.RoleTitle where User.RoleID=Role.RoleID
Posted

1 solution

 
Share this answer
 
Comments
mosi98 16-Mar-14 8:42am    
don't work in my project,have error

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900