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