public static Employee[] Get(string login) { var q = new Entities.Employee(); var u = q.Query(@"select e.HRE_FIRST_NAME, e.HRE_FAMILY_NAME, e.HRE_LAST_NAME, d.HRD_NAME, p.HRP_NAME, s.HRS_SUM, e.HRE_ID, e.ACL_USER_ID, u.ACLU_EMAIL from ACL_USER u, HR_EMPLOYEE e, HR_POSITION p, HR_DEPARTMENT d, HR_SALARY s where u.ACLU_LOGIN = @0 and e.ACL_USER_ID = u.ACL_USER_ID and p.HRP_ID = e.HRP_ID and d.HRD_ID = e.HRD_ID and s.HRD_ID = e.HRD_ID and s.HRP_ID = e.HRP_ID ", args: login); return((from d in u select(Employee) FromEntity(d)).ToArray()); }
public static IEnumerable <Employee> All() { var q = new Entities.Employee(); var u = q.Query(@"select e.HRE_FIRST_NAME, e.HRE_FAMILY_NAME, e.HRE_LAST_NAME, d.HRD_NAME, p.HRP_NAME, s.HRS_SUM, e.HRE_ID, e.ACL_USER_ID, u.ACLU_EMAIL from HR_EMPLOYEE e, HR_POSITION p, HR_DEPARTMENT d, HR_SALARY s, ACL_USER u where p.HRP_ID = e.HRP_ID and d.HRD_ID = e.HRD_ID and s.HRD_ID = e.HRD_ID and s.HRP_ID = e.HRP_ID and u.ACL_USER_ID = e.ACL_USER_ID "); return((from d in u select(Employee) FromEntity(d)).AsEnumerable <Employee>()); }
public static Employee Get(int id) { var q = new Entities.Employee(); var u = q.Query(@"select e.HRE_FIRST_NAME, e.HRE_FAMILY_NAME, e.HRE_LAST_NAME, d.HRD_NAME, p.HRP_NAME, s.HRS_SUM, e.HRE_ID, e.ACL_USER_ID, u.ACLU_EMAIL from HR_EMPLOYEE e, HR_POSITION p, HR_DEPARTMENT d, HR_SALARY s, ACL_USER u where e.HRE_ID = @0 and p.HRP_ID = e.HRP_ID and d.HRD_ID = e.HRD_ID and s.HRD_ID = e.HRD_ID and s.HRP_ID = e.HRP_ID and u.ACL_USER_ID = e.ACL_USER_ID ", args: id).FirstOrDefault(); return(FromEntity(u)); }