Example #1
0
 private IEnumerable<RoleAdminBindingModel> Map(IEnumerable<Role> sources)
 {
     foreach (var user in sources.NullToEmpty())
     {
         yield return new RoleAdminBindingModel
         {
             Id = user.Id.ToString(),
             Name = user.Name,
         };
     }
 }
Example #2
0
 private IEnumerable<UserAdminBindingModel> Map(IEnumerable<User> sources)
 {
     foreach (var user in sources.NullToEmpty())
     {
             yield return new UserAdminBindingModel
             {
                 Id = user.Id.ToString(),
                 UserName = user.UserName,
                 Password = string.Empty,
                 Active = !user.Active.HasValue || user.Active.Value,
                 Organization = user.Organization,
                 Email = user.Email,
             };
     }
 }