try adding the role Id to the task class
public partial class Task
{
public Task()
{
this.Users_Tasks = new HashSet<Users_Tasks>();
this.Roles = new HashSet<Role>();
}
public int TaskID { get; set; }
public string TaskName { get; set; }
public string TaskDescription { get; set; }
public int RoleID { get; set; }
public virtual Roles Roles{ get; set;
}