public void Start() { Console.WriteLine("Press 1 to add Student"); Console.WriteLine("Press 2 to Display Students"); Console.WriteLine("Press 3 to Search Student By Name"); Console.WriteLine("Press 4 to Delete Student"); int choice = Convert.ToInt32(Console.ReadLine()); if (choice == ADD_CHOICE) { GetDetails(); } else if (choice == DISPLAY_CHOICE) { Print(studentobj.Get()); } else if (choice == SEARCH_STUDENT_CHOICE) { Search(); } else if (choice == DELETE_STUDENT_CHOICE) { Delete(); } /* switch (choice) * { * case ADD_CHOICE: * GetDetails(); * break; * case DISPLAY_CHOICE: * Print(studentobj.Get()); * break; * case SEARCH_STUDENT_CHOICE: * Search(); * break; * case DELETE_STUDENT_CHOICE: * Delete(); * break; * } */ }
public async Task <ActionResult <Student[]> > Get() { _Logger.LogInformation("Запрос всех студентов"); return(await _StudentStore.Get().ToArrayAsync()); }