public List <TimeEntryDTO> Search(int projectId, bool onlyMine, Nullable <DateTime> startDate, string endDate, int teamId, string activity) { Nullable <DateTime> modifiedEndDate = null; DateTime newEndDate; if (DateTime.TryParse(endDate, out newEndDate)) { modifiedEndDate = newEndDate.AddDays(1); } string user = Membership.GetUser().UserName; return(repo.Search(user, projectId, onlyMine, startDate, modifiedEndDate, teamId, activity)); }