You can't share what you figured out? Maybe, someone else may face a similar problem that you post could help.
It was a completely different issue then what I posted on here. Had nothing to do with what I posted on here. I basically had to create a new linq query from a different form in the solution.
Member
194 Points
1137 Posts
Need help with SQL to LINQ conversion
Nov 12, 2018 03:12 PM|bootzilla|LINK
I'm trying to convert this sql statement to linq and need some assistance:
Here is my linq code (usr is WINS_USER table):
I don't know how to combine the two tables in the FROM clause together using LINQ.
How do I convert that sql to linq, what am I doing incorrectly?
Contributor
4963 Points
4218 Posts
Re: Need help with SQL to LINQ conversion
Nov 12, 2018 06:35 PM|DA924|LINK
How did the T-SQL even work without a T-SQL Join on the two tables?
A Join on mca.LOCATIONNAME equals ul.locationname Where mca.UserId = value
Your Linq is nowhere in the ball park in ever working, at least I have never seen such a Linq statement. using a String.Join()
Contributor
4963 Points
4218 Posts
Re: Need help with SQL to LINQ conversion
Nov 13, 2018 05:08 PM|DA924|LINK
Linq 101 shows you how to use a Linq Join.
https://code.msdn.microsoft.com/101-LINQ-Samples-3fb9811b
Here is an example of T-SQL Join.
https://www.tutorialspoint.com/t_sql/t_sql_joining_tables.htm
Member
194 Points
1137 Posts
Re: Need help with SQL to LINQ conversion
Nov 14, 2018 03:13 PM|bootzilla|LINK
I figured it out.
Contributor
4963 Points
4218 Posts
Re: Need help with SQL to LINQ conversion
Nov 14, 2018 06:22 PM|DA924|LINK
You can't share what you figured out? Maybe, someone else may face a similar problem that you post could help.
Member
194 Points
1137 Posts
Re: Need help with SQL to LINQ conversion
Nov 16, 2018 08:21 PM|bootzilla|LINK
It was a completely different issue then what I posted on here. Had nothing to do with what I posted on here. I basically had to create a new linq query from a different form in the solution.