public List <Job> GetAllJob() { try { using (var entities = new PublisherModel()) { return(entities.Jobs.ToList()); } } catch (Exception e) { throw e; } }
public List <Publisher> GetAllPublishers() { try { using (var entities = new PublisherModel()) { var query = from Publisher in entities.Publishers.Include("Employees") select Publisher; return(query.ToList()); } } catch (Exception e) { throw e; } }
public int UpdateEmployee(Employee e) { try { using (var entities = new PublisherModel()) { foreach (var employee in entities.Employees) { if (employee.Equals(e)) { } return(1); } } } catch (Exception ex) { throw ex; } return(0); }
public Job GetJobByID(int job_id) { try { using (var entities = new PublisherModel()) { foreach (var job in entities.Jobs) { if (job.job_id == job_id) { return(job); } } } } catch (Exception e) { throw e; } return(null); }