April 20, 2012 at 9:53 am
HI,
i'm using EF and mvc3 application.
i need to populate dropdownlist from following sql query but for that i need to convert this query into linq.
so please help me. how can i do inner join in linq ? or is there any way to do it using EF?
SELECT
DISTINCT
SecurityIdentifier_All.SecurityId,
NAV.CompanyName,
NAV.SecurityType,
SecurityIdentifier_All.Identifier,
SecurityIdentifier_All.SecurityIdentifierTypeId
FROM
Fireball_Reporting..Reporting_DailyNAV_Pricing NAV
INNER JOIN
Fireball_Reporting..SecurityIdentifier_All ON
SecurityIdentifier_All.SecurityId = NAV.PricingSecurityID
April 20, 2012 at 10:12 am
Use stored procs with EF.
http://msdn.microsoft.com/en-us/library/bb896279.aspx
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
April 20, 2012 at 10:18 am
you mean to say... no need to convert syntax??
directly add these sql statement into stored procedure and use that sp??
April 20, 2012 at 10:20 am
Yes.
April 20, 2012 at 10:27 am
ok thanks plz guide me as i have added new sp in database sp_getdata
now in model added function import..
then in return a collection of :: Entity of table right? or create new comple xtype??
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply