Created
September 19, 2012 17:26
-
-
Save luisrudge/3750939 to your computer and use it in GitHub Desktop.
utilizando proc com entity framework
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Recupera o relatório de questionários respondidos | |
/// </summary> | |
/// <param name="userId">Código do usuário</param> | |
/// <param name="startDate">Data de filtro: De</param> | |
/// <param name="endDate">Data de filtro: Até</param> | |
/// <param name="trainingId">Código do treinamento</param> | |
/// <returns></returns> | |
public IEnumerable<UserReportDTO> GetReports(int userId, DateTime? startDate, DateTime? endDate, string trainingId) | |
{ | |
return Db.Database.SqlQuery<UserReportDTO> | |
("GetUserReport @UserID = {0}, @StartDate = {1}, @EndDate = {2}, @trainingId = {3}", | |
userId, startDate ?? new DateTime(2012, 1, 1), endDate ?? new DateTime(2100, 1, 1), | |
trainingId).ToList(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment