Skip to content

Commit 6dcc6f8

Browse files
committed
initialitze the list in constructor
1 parent 4c59c5e commit 6dcc6f8

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

src/Services/Marketing/Marketing.API/Model/Campaing.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ public class Campaign
1515

1616
public string Url { get; set; }
1717

18-
public ICollection<Rule> Rules { get; set; }
18+
public List<Rule> Rules { get; set; }
19+
20+
21+
public Campaign()
22+
{
23+
Rules = new List<Rule>();
24+
}
1925
}
2026
}

src/Services/Marketing/Marketing.API/Model/Rule.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System.Collections.Generic;
1+
using System.ComponentModel.DataAnnotations.Schema;
22

33
namespace Microsoft.eShopOnContainers.Services.Marketing.API.Model
44
{
@@ -26,4 +26,4 @@ public class UserLocationRule : Rule
2626
{
2727
public int LocationId { get; set; }
2828
}
29-
}
29+
}

0 commit comments

Comments
 (0)