Showing posts with label Join. Show all posts
Showing posts with label Join. Show all posts

Sunday, October 16, 2016

The type of one of the expressions in the join clause is incorrect. Type inference failed in the call to 'Join'.

public List<data>GetData()
        {

            return (
                from ud in dbcontext.userdetails
                join td in dbcontext.taskdetails
                on new
                {
                   ud.uid ,
                }
                equals new
                {
                   td.uid.Value ,
                }
                select new data
                {
                    name = td.name,
                    amount = td.amount
                }

                ).ToList();

        }


Solution :- 

public List<data>GetData()
        {

            return (
                from ud in dbcontext.userdetails
                join td in dbcontext.taskdetails
                on new
                {
                   uid =  ud.uid ,
                }
                equals new
                {
                  uid = td.uid.Value ,
                }
                select new data
                {
                    name = td.name,
                    amount = td.amount
                }

                ).ToList();
        }

Git Commands

Git Version   To check the git version Git -v       Git Clone To clone the repository, use the following command: Git clone [u...