Tests.EmployeeRepositoryEF_Intermediate_NoTrack.GetOfficePhoneNumbers C# (CSharp) Method

GetOfficePhoneNumbers() public method

public GetOfficePhoneNumbers ( ) : IList
return IList
        public IList<EmployeeOfficePhone> GetOfficePhoneNumbers()
        {
            using (var context = new CodeFirstModels())
            {
                return context.Employees.Select(e => new EmployeeOfficePhone()
                {
                    EmployeeKey = e.EmployeeKey,
                    FirstName = e.FirstName,
                    LastName = e.LastName,
                    OfficePhone = e.OfficePhone
                }).AsNoTracking().ToList();
            }
        }