Created
August 8, 2013 01:25
-
-
Save fernandezdavid/6180639 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| foreach (var campDetail in camp.AdvertCampaignDetails) | |
| { | |
| DateTime check_date = DateTime.Now.AddDays(-i); | |
| inter += _db.AdvertCampaignDetailInteractions | |
| .Where(c => c.AdvertID == campDetail.AdvertID && EntityFunctions.TruncateTime(c.StartDatetime) == check_date.Date) | |
| .Count(); | |
| elapsedTime += _db.AdvertCampaignDetailInteractions | |
| .Where(c => c.AdvertID == campDetail.AdvertID && EntityFunctions.TruncateTime(c.StartDatetime) == check_date.Date && c.TimeElapsed!=null) | |
| .Sum(c => c.TimeElapsed.GetValueOrDefault(0)); | |
| height += _db.AdvertCampaignDetailInteractions | |
| .Where(c => c.AdvertID == campDetail.AdvertID && EntityFunctions.TruncateTime(c.StartDatetime) == check_date.Date) | |
| .Sum(c=>c.Height); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment