public static GroupUserApiModel ToGroupUserApiModel(this Group group) { var groupUserApiModel = new GroupUserApiModel { Id = group.Id, GroupName = group.Name, Users = group.Users?.Where(u => !u.IsDeleted).Select(r => r.ToUserApiModel()), GroupSource = group.Source }; return(groupUserApiModel); }
public static GroupUserApiModel ToGroupUserApiModel(this Group group) { var groupUserApiModel = new GroupUserApiModel { Id = group.Id, GroupName = group.Name, DisplayName = string.IsNullOrWhiteSpace(group.DisplayName) ? group.Name : group.DisplayName, Description = group.Description, Users = group.Users?.Where(u => !u.IsDeleted).Select(r => r.ToUserApiModel()), GroupSource = group.Source }; return(groupUserApiModel); }