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