void UpdateDepartment() { Dept d = new Dept(); Console.Write("Enter Id = "); d.Id = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter Name = "); d.DName = Console.ReadLine(); Console.Write("Enter Location = "); d.Loc = Console.ReadLine(); if (deptService.UpdateDepartment(d) > 0) { Console.WriteLine("Department Updated"); } else { Console.WriteLine("Some error"); } }