uniblab icon

Untitled

uniblab | PRO | 06/08/18 06:01:04 AM UTC | 0 ⭐ | 1333 👁️ | Never ⏰ | []
C# |

840 B

|

None

|

0 👍

/

0 👎

using System.Linq;
 
namespace Johnson.FacStaffList {
 
    public sealed class PersonToRecord : Icod.Wod.Data.IMapWith {
 
        public PersonToRecord() : base() {
        }
 
 
        System.Collections.Generic.IEnumerable<System.Object> Icod.Wod.Data.IMapWith.ExecuteMap( System.Object obj ) {
            return this.ExecuteMap( obj as System.Collections.Generic.IEnumerable<Person> );
        }
        public System.Collections.Generic.IEnumerable<System.Object> ExecuteMap( System.Collections.Generic.IEnumerable<Person> collection ) {
            return ( collection ?? new Person[ 0 ] ).SelectMany(
                x => x.jobs, 
                ( person, job ) => new {
                    person.netid,
                    person.emplid,
                    job.primary_job,
                    job.title_work,
                    person.fname,
                    person.mname,
                    person.lname,
                    person.suffix,
                    person.salutation,
                    job.manager_emplid
                }
            );
        }
 
    }
 
}

Comments