static void Main(string[] args) { Console.WriteLine("Welcome to the Address Book Data LINQ Operartion Program"); ///Creating the instance of the address book repository AddressBookDataTable.AddDataIntoTable(); /// UC4 Editing exiting Contact Details. AddressBookDataTable.EditExistingContactDetails("Mansingh", "Meena", 322514); /// UC5 Delete Person Contact Using Name. AddressBookDataTable.DeleteContactUsingName(); /// UC6 Retrieving Contact Details By State Or City Name. AddressBookDataTable.RetrievingContactDetailsByCityOrState(); /// UC7 Get the count of number of contacts as per the state or city. AddressBookDataTable.GetCountOfContactInCityOrState(); /// UC8 Retrieves the records sorted by name for a given city. AddressBookDataTable.SortedContactsByNameForAgivenCity("Imartapura"); Console.ReadLine(); }
static void Main(string[] args) { Console.WriteLine("Welcome to the Address Book Data LINQ Operartion Program"); //UC 1,2,3 AddressBookDataTable.AddDataIntoTable(); //AddressBookDataTable.DisplayTableContents(); //UC 4 AddressBookDataTable.EditExistingContact("Lebron", "James", 136119); AddressBookDataTable.DisplayTableContents(); // UC_5 AddressBookDataTable.DeleteContact("Lebron", "James"); AddressBookDataTable.DisplayTableContents(); //UC 6 AddressBookDataTable.RetrievePersonFromACityOrState("Lakers", "Boston"); //UC 7 AddressBookDataTable.GetCountOfContactInCityOrState(); //UC 8 AddressBookDataTable.RetrieveRecordsSortedByNameForAGivenCity("Celtics"); }
static void Main(string[] args) { Console.WriteLine("Address Book System"); AddressBookDataTable addressBookDataTable = new AddressBookDataTable(); /// Calling CreateDataTable method from AddressBookDataTable class Console.WriteLine("Adding data to data table...."); addressBookDataTable.CreateDataTable(); /// Calling EditContact method from AddressBookDataTable class Console.WriteLine("Updated table.."); addressBookDataTable.EditContact(); /// Calling DeleteContact method from AddressBookDataTable class Console.WriteLine("Deleting contact..."); addressBookDataTable.DeleteContact(); /// Calling RetrieveDataWithCityOrState method from AddressBookDataTable class Console.WriteLine("Contacts with city or state name: "); addressBookDataTable.RetrieveDataWithCityOrState(); /// Calling CountByCity and CountByState method from AddressBookDataTable class Console.WriteLine("Count by city: "); addressBookDataTable.CountByCity(); Console.WriteLine("Count by state: "); addressBookDataTable.CountByState(); }