Example #1
0
        public void updateDepartment(string id, department d)
        {
            department dbd = database.departments.First(data => data.iddepartment == id);

            dbd = d;
            database.SaveChanges();
        }
Example #2
0
        public void deleteDepartment(string id)
        {
            department d = database.departments.First(data => data.iddepartment == id);

            database.departments.Remove(d);
        }
Example #3
0
        public department getDepartment(string id)
        {
            department d = database.departments.First(data => data.iddepartment == id);

            return(d);
        }
Example #4
0
 public void insertDepartment(ref department d)
 {
     database.departments.Add(d);
     database.SaveChanges();
 }