I need to return through Web Api a Base64 XML output based upon calling a stored procedures which runs 5 different queries.
Stored procedure is not written ( I need to write it ) but there are 5 queries in which the data is completely different tables and columns etc... so I am wondering if this is even possible?
I know in Oracle you can return multiple cursors, but with SQL Server , can I return into asp.net 4.5 ( mvc c# / Ado.net) multiple datasets or collections? Any examples of this?
Example of just ONE of the queries
-- Content Tab
SELECT -- vTC.[TemplateId]
t.Name as "Client Name and Document" ,vTC.[SectionName] ,vTC.[ContentId] ,vTC.[ContentName]
,vTC.[ContentDescription],vTC.[ContentValue] ,CAL.ContentValue as "Spanish Content" , iif(S.IsClientSection = 1, 'Global Section','Template Section') as "Global or Template Section"
,DT.Title as DataType ,iif(vTC.IsRequired = 1, 'Yes', 'No') as "Required" ,vTC.[DisplayType]
FROM [dbo].[vwTemplateContent] vTC
left join dbo.Template t on vTC.TemplateId = t.TemplateId
left join dbo.DataType DT on vTC.DataTypeId = dt.datatypeid
left join dbo.Section S on S.SectionID = vTC.SectionID
left join [dbo].[ContentAlternateLanguage] CAL on vTC.ContentId = CAL.ContentID
where vTC.templateid in (1)
order by DisplayOrder
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…