public ActionResult Show(int employeeId, int dutyId) { Duty duty = Duty.Find(dutyId); Employee employee = Employee.Find(employeeId); Dictionary <string, object> model = new Dictionary <string, object>(); model.Add("duty", duty); model.Add("employee", employee); return(View(model)); }
public void Find_ReturnsCorrectDutyFromDatabase_Duty() { Duty newDuty1 = new Duty("fire the cannons"); newDuty1.Save(); Duty newDuty2 = new Duty("trim sails"); newDuty2.Save(); Duty foundDuty = Duty.Find(newDuty1.Id); Assert.AreEqual(newDuty1, foundDuty); }