11
Answers

Why .EDMX file does not update a Stored procedure?

Mani Kandan

Mani Kandan

8y
1.1k
1
Hello Everyone,
 
1) After updating .EDMX fill in mvc4 by the way Entity Framework, this procedure name not getting like Model.SP_FinalExposureMonitor_Final_Result, model class. Why this?  
 
2) After executing this procedure I want list of items, but now db.SP_FinalExposureMonitor(); return type is int
 How can I return this procedure with list items? 
 
  1. CREATE PROCEDURE SP_FinalExposureMonitor_Final
  2.  @SortColumn varchar(100)    
  3. AS    
  4. BEGIN    
  5.  declare @dynamicSQL nvarchar(max) = '';      
  6. select @dynamicSQL = 'select tempID,ProgramId,ChannelId,convert(date,Date_DL)asDate_DL,StartTime,EndTime,Viewers,    
  7. Tx,TVR,CVR,DVR,    
  8. Details_Id,    
  9. MastersId,BrandsId,ItemsId,Note,PaidForOrProp,Verbal,Indexes,Seconds,    
  10. GradesId,ChannelName,CountryName,WebSiteName,ProductionName,BrandName,ItemName,    
  11. Product_company_id,CompanyName,ProductGroupsId,    
  12. SectorsId,SubSectoresId,AgenciesId,GroupName,SectorName,SubsectoreName,    
  13. AgencyName,agencyID,QualityGrade,CPH_DL,CPH_UN,Country_CPH,Country_UN,    
  14. Web_CPH,Web_UN,    
  15. AdFactor,Duration_Factor,DaypartName,DaypartId,DaypartFactor,CinemaFactor,DigitalFactor,MediaValue,ROW_NUMBER() over (order by '+ @SortColumn +')AS RowNum from MonitorExposureFinal2;'    
  16. execute sp_executeSQL @dynamicSQL    
  17. print @dynamicSQL    
  18. END  
 

Answers (11)