TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
manjula d
NA
172
139.9k
how to convert sql of this query to LINQ
Sep 24 2013 3:11 AM
"select file_name from bp_vendor_doc_details where upload_id=(select upload_id from bp_vendor_upload_doc where bid_id=@bidid and vendor_id=@vendorid)";
i need to write LINQ of this Query
i wrote like this:
var vendocdetails = (from VDD in objbidportalEntity.bp_vendor_doc_details join UD in objbidportalEntity.bp_vendor_upload_doc on VDD.Upload_Id equals UD.Upload_Id where UD.Bid_Id == paramBidId && UD.Vendor_Id == paramVendorId select new { UD.upload_id , VDD.file_name});
DataTable dt = new DataTable();
dt.Columns.Add("path", typeof(string));
DataRow dr;
List<string> lstFiles =
vendocdetails.ToList<string>();
foreach (string vendor in lstFiles )
{
dr = dt.NewRow();
dr[0] = lstFiles ;
dt.Rows.Add(dr);
}
i got error to red mark of Anonymous Types
Reply
Answers (
2
)
using linq query to select count
Get the Time Difference between records