Esempio n. 1
0
 public Employee SaveEmployee(Employee e)
 {
     SalesERPDAL salesDal = new SalesERPDAL();
     salesDal.Employees.Add(e);
     salesDal.SaveChanges();
     return e;
 }
Esempio n. 2
0
      public List<Employee> GetEmployees()
      {
          //List<Employee> employees = new List<Employee>();

          //Employee emp = new Employee();
          //emp.FirstName = "johnson";
          //emp.LastName = " fernandes";
          //emp.Salary = 14000;
          //employees.Add(emp);   

          //emp = new Employee();
          //emp.FirstName = "michael";
          //emp.LastName = "jackson";
          //emp.Salary = 16000;
          //employees.Add(emp);
   
          //emp = new Employee();
          //emp.FirstName = "robert";
          //emp.LastName = " pattinson";
          //emp.Salary = 20000;
          //employees.Add(emp);
   
          //return employees;

          SalesERPDAL salesDal = new SalesERPDAL();
          return salesDal.Employees.ToList();
      }
Esempio n. 3
0
 public void UploadEmployees(List<Employee> employees)
 {
     SalesERPDAL salesDal = new SalesERPDAL();
     salesDal.Employees.AddRange(employees);
     salesDal.SaveChanges();
 }
Esempio n. 4
0
 public List<Employee> GetEmployees()
 {
     SalesERPDAL salesDal = new SalesERPDAL(); //Errors on this line when Entity Framework not installed in WebApplication1
     return salesDal.Employees.ToList();
 }