Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- }
- );
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement