AssocSelf.Controllers.Manager.EmployeeGetAllWithOrgInfo C# (CSharp) 메소드

EmployeeGetAllWithOrgInfo() 공개 메소드

public EmployeeGetAllWithOrgInfo ( ) : IEnumerable
리턴 IEnumerable
        public IEnumerable<EmployeeWithOrgInfo> EmployeeGetAllWithOrgInfo()
        {
            // Ugh, I hate these property names
            var c = ds.Employees.Include("Employee1").Include("Employee2");

            // Return the result
            return Mapper.Map<IEnumerable<EmployeeWithOrgInfo>>
                (c.OrderBy(e => e.LastName).ThenBy(e => e.FirstName));
        }

Usage Example

예제 #1
0
 // GET: Employees
 public ActionResult Index()
 {
     return(View(m.EmployeeGetAllWithOrgInfo()));
 }