public void AssignRoomToDepartment(Department department, Room room) { if (department == null) throw new ArgumentNullException("department"); if (room == null) throw new ArgumentNullException("room"); var departmentService = new DepartmentService(Context); departmentService.AssignRoom(department, room); }
public void AssignRoomToDepartment(string departmentName, string roomName) { if (string.IsNullOrEmpty(departmentName)) throw new ArgumentNullException("department"); if (string.IsNullOrEmpty(roomName)) throw new ArgumentNullException("roomName"); var departmentService = new DepartmentService(Context); departmentService.AssignRoom(departmentName, roomName); }