Exemplo n.º 1
0
 public UserBan BuildUserBan(Ban ban, Usr usr)
 {
     return(new UserBan
     {
         BanId = int.Parse(ban.Id),
         UserId = int.Parse(usr.Id),
         BanAccessRightsId = ban.BanAccessRightsId
     });
 }
Exemplo n.º 2
0
 public UserSubscription BuildUserSubscription(Subscr subscription, Usr usr)
 {
     return(new UserSubscription
     {
         Id = NextId(),
         SubscriptionId = int.Parse(subscription.Id),
         UserId = int.Parse(usr.Id),
         Subscription = BuildSubscription(subscription)
     });
 }
Exemplo n.º 3
0
 public User BuildUser(Usr usr)
 {
     return(new User
     {
         Id = NextId(),
         Email = usr.Email,
         Name = usr.Name,
         LastName = usr.LastName,
         SSN = usr.SSN,
         SegmentId = usr.SegmentId,
         BrandId = usr.BrandId,
         RoleId = usr.RoleId,
         UserBans = BuildUserBans(usr.Bans, usr).ToList(),
         UserSubscriptions = BuildUserSubscriptions(usr.Subscriptions, usr).ToList()
     });
 }
Exemplo n.º 4
0
 public IEnumerable <UserBan> BuildUserBans(IEnumerable <Ban> bans, Usr usr)
 {
     return(bans.Select(ban => BuildUserBan(ban, usr)));
 }
Exemplo n.º 5
0
 public IEnumerable <UserSubscription> BuildUserSubscriptions(IEnumerable <Subscr> subscriptions, Usr usr)
 {
     return(subscriptions.Select(sub => BuildUserSubscription(sub, usr)));
 }