Exemplo n.º 1
0
 public static IQueryable <Employee> GetCompleteCurves(this JamesDbContext context)
 {
     return(context.Employee
            .Include(e => e.Job));
 }
Exemplo n.º 2
0
 public ValuesController(JamesDbContext context, IEmployeeService employeeService, IMapper mapper)
 {
     this.Context         = context;
     this.EmployeeService = employeeService;
     this.Mapper          = mapper;
 }
Exemplo n.º 3
0
 public static Job GetCompleteCurveById(this JamesDbContext context, int id)
 {
     return(context.Job
            .Include(i => i.Employees)
            .FirstOrDefault(j => j.JobId == id));
 }
Exemplo n.º 4
0
 public Job GetJobById(JamesDbContext ctx, int id) =>
 ctx.Job.FirstOrDefault(e => e.JobId == id);
Exemplo n.º 5
0
 public ThreadingExample(JamesDbContext context)
 {
     this.Context = context;
 }
Exemplo n.º 6
0
 public IEnumerable <Job> GetJobs(JamesDbContext ctx) =>
 ctx.Job;
Exemplo n.º 7
0
        public IEnumerable <Employee> GetEmployeeByJobName(JamesDbContext ctx, string jobName)
        {
            var job = ctx.Job.FirstOrDefault(j => j.JobName == jobName);

            return(ctx.Employee.Where(e => e.JobId == job.JobId));
        }
Exemplo n.º 8
0
 public IEnumerable <Employee> GetEmployeeById(JamesDbContext ctx, List <int> ids) =>
 ctx.Employee.Where(e => ids.Contains(e.EmployeeId));
Exemplo n.º 9
0
 public Employee GetEmployeeById(JamesDbContext ctx, int id) =>
 ctx.Employee.FirstOrDefault(e => e.EmployeeId == id);
Exemplo n.º 10
0
 public IEnumerable <Employee> GetEmployees(JamesDbContext ctx) =>
 ctx.Employee;