本文整理汇总了C#中Model.User.AddAdvert方法的典型用法代码示例。如果您正苦于以下问题:C# User.AddAdvert方法的具体用法?C# User.AddAdvert怎么用?C# User.AddAdvert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Model.User
的用法示例。
在下文中一共展示了User.AddAdvert方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UserDal
static UserDal()
{
int i = 0;
const string name = "User";
const string fullname = "João Constantino ";
AdvertiseDal advertiseDal = new AdvertiseDal();
User user0 = new User(name + i, "123", "[email protected]", DistrictEnum.Lisboa, fullname + i, 910000000 + i);
Users.Add(name + i++, user0);
User user1 = new User(name + i, "123", "[email protected]", DistrictEnum.Lisboa, fullname + i, 910000000 + i);
foreach (var advert in advertiseDal.GetAll())
user1.AddAdvert(advert.Id);
Users.Add(name + i++, user1);
User user2 = new User(name + i, "123", "[email protected]", DistrictEnum.Madeira, fullname + i, 910000000 + i);
Users.Add(name + i++, user2);
User user3 = new User(name + i, "123", "[email protected]", DistrictEnum.Porto, fullname + i, 910000000 + i);
Users.Add(name + i++, user3);
User user4 = new User(name + i, "123", "[email protected]", DistrictEnum.Coimbra, fullname + i, 910000000 + i);
Users.Add(name + i++, user4);
User user5 = new User(name + i, "123", "[email protected]", DistrictEnum.Lisboa, fullname + i, 910000000 + i);
Users.Add(name + i, user5);
}