Advertisement
uniblab

Untitled

Jun 8th, 2018
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.84 KB | None | 0 0
  1. using System.Linq;
  2.  
  3. namespace Johnson.FacStaffList {
  4.  
  5.     public sealed class PersonToRecord : Icod.Wod.Data.IMapWith {
  6.  
  7.         public PersonToRecord() : base() {
  8.         }
  9.  
  10.  
  11.         System.Collections.Generic.IEnumerable<System.Object> Icod.Wod.Data.IMapWith.ExecuteMap( System.Object obj ) {
  12.             return this.ExecuteMap( obj as System.Collections.Generic.IEnumerable<Person> );
  13.         }
  14.         public System.Collections.Generic.IEnumerable<System.Object> ExecuteMap( System.Collections.Generic.IEnumerable<Person> collection ) {
  15.             return ( collection ?? new Person[ 0 ] ).SelectMany(
  16.                 x => x.jobs,
  17.                 ( person, job ) => new {
  18.                     person.netid,
  19.                     person.emplid,
  20.                     job.primary_job,
  21.                     job.title_work,
  22.                     person.fname,
  23.                     person.mname,
  24.                     person.lname,
  25.                     person.suffix,
  26.                     person.salutation,
  27.                     job.manager_emplid
  28.                 }
  29.             );
  30.         }
  31.  
  32.     }
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement