Remove campaign test images and add new two images and change the name campaign seed
@ -141,7 +141,9 @@
|
|||||||
var userCampaignList = await _context.Rules
|
var userCampaignList = await _context.Rules
|
||||||
.OfType<UserLocationRule>()
|
.OfType<UserLocationRule>()
|
||||||
.Include(c => c.Campaign)
|
.Include(c => c.Campaign)
|
||||||
.Where(c => c.LocationId == userLocation.LocationId)
|
.Where(c => c.Campaign.From >= DateTime.Now
|
||||||
|
&& c.Campaign.To <= DateTime.Now
|
||||||
|
&& c.LocationId == userLocation.LocationId)
|
||||||
.Select(c => c.Campaign)
|
.Select(c => c.Campaign)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
{
|
{
|
||||||
new Campaign
|
new Campaign
|
||||||
{
|
{
|
||||||
Name = "Campaign Name 1",
|
Name = ".NET Bot Black Hoodie 50% OFF",
|
||||||
Description = "Campaign Description 1",
|
Description = "Campaign Description 1",
|
||||||
From = DateTime.Now,
|
From = DateTime.Now,
|
||||||
To = DateTime.Now.AddDays(7),
|
To = DateTime.Now.AddDays(7),
|
||||||
@ -42,24 +42,24 @@
|
|||||||
{
|
{
|
||||||
new UserLocationRule
|
new UserLocationRule
|
||||||
{
|
{
|
||||||
Description = "UserLocationRule1",
|
Description = "Campaign is only for United States users.",
|
||||||
LocationId = 1
|
LocationId = 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new Campaign
|
new Campaign
|
||||||
{
|
{
|
||||||
Name = "Campaign Name 2",
|
Name = "Roslyn Red T-Shirt 3x2",
|
||||||
Description = "Campaign Description 2",
|
Description = "Campaign Description 2",
|
||||||
From = DateTime.Now.AddDays(7),
|
From = DateTime.Now.AddDays(-7),
|
||||||
To = DateTime.Now.AddDays(14),
|
To = DateTime.Now.AddDays(14),
|
||||||
PictureUri = "http://externalcatalogbaseurltobereplaced/api/v1/campaigns/2/pic",
|
PictureUri = "http://externalcatalogbaseurltobereplaced/api/v1/campaigns/2/pic",
|
||||||
Rules = new List<Rule>
|
Rules = new List<Rule>
|
||||||
{
|
{
|
||||||
new UserLocationRule
|
new UserLocationRule
|
||||||
{
|
{
|
||||||
Description = "UserLocationRule2",
|
Description = "Campaign is only for Seattle users.",
|
||||||
LocationId = 6
|
LocationId = 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 631 B After Width: | Height: | Size: 136 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 166 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.2 KiB |