From 770e3965cdffff684462ccec6f6c8c479df0a2a1 Mon Sep 17 00:00:00 2001 From: Cade Date: Sat, 14 Mar 2026 14:09:21 -0400 Subject: [PATCH] Project Finished! --- jcshepherd63.Flashcards/.gitattributes | 63 +++ jcshepherd63.Flashcards/.gitignore | 366 ++++++++++++++++++ .../jcshepherd63.Flashcards.slnx | 3 + .../Controllers/FlashcardController.cs | 41 ++ .../Controllers/StackController.cs | 22 ++ .../DTOs/FlashcardDTO.cs | 13 + .../jcshepherd63.Flashcards/DTOs/StackDTO.cs | 11 + .../Enums/FlashcardsEnum.cs | 14 + .../Enums/MainMenuEnum.cs | 13 + .../Enums/StacksEnum.cs | 14 + .../Flashcards.App.DatabaseCreation.cs | 17 + .../Models/Flashcard.cs | 27 ++ .../jcshepherd63.Flashcards/Models/Stack.cs | 20 + .../Models/StudySession.cs | 10 + .../jcshepherd63.Flashcards/Program.cs | 11 + .../jcshepherd63.Flashcards/README.md | 16 + .../Services/FlashcardService.cs | 95 +++++ .../Services/StackService.cs | 71 ++++ .../StudyArea/StudyAreaService.cs | 58 +++ .../StudyArea/StudySessionController.cs | 109 ++++++ .../StudyArea/StudySessionDTO.cs | 14 + .../StudyArea/StudySessionMenu.cs | 71 ++++ .../Table Creation Script.sql | 23 ++ .../Views/FlashcardMenu.cs | 113 ++++++ .../jcshepherd63.Flashcards/Views/MainMenu.cs | 52 +++ .../Views/StacksMenu.cs | 107 +++++ .../jcshepherd63.Flashcards/appsettings.json | 5 + .../jcshepherd63.Flashcards.csproj | 29 ++ 28 files changed, 1408 insertions(+) create mode 100644 jcshepherd63.Flashcards/.gitattributes create mode 100644 jcshepherd63.Flashcards/.gitignore create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards.slnx create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/Controllers/FlashcardController.cs create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/Controllers/StackController.cs create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/DTOs/FlashcardDTO.cs create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/DTOs/StackDTO.cs create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/Enums/FlashcardsEnum.cs create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/Enums/MainMenuEnum.cs create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/Enums/StacksEnum.cs create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/Flashcards.App.DatabaseCreation.cs create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/Models/Flashcard.cs create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/Models/Stack.cs create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/Models/StudySession.cs create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/Program.cs create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/README.md create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/Services/FlashcardService.cs create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/Services/StackService.cs create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/StudyArea/StudyAreaService.cs create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/StudyArea/StudySessionController.cs create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/StudyArea/StudySessionDTO.cs create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/StudyArea/StudySessionMenu.cs create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/Table Creation Script.sql create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/Views/FlashcardMenu.cs create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/Views/MainMenu.cs create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/Views/StacksMenu.cs create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/appsettings.json create mode 100644 jcshepherd63.Flashcards/jcshepherd63.Flashcards/jcshepherd63.Flashcards.csproj diff --git a/jcshepherd63.Flashcards/.gitattributes b/jcshepherd63.Flashcards/.gitattributes new file mode 100644 index 00000000..1ff0c423 --- /dev/null +++ b/jcshepherd63.Flashcards/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/jcshepherd63.Flashcards/.gitignore b/jcshepherd63.Flashcards/.gitignore new file mode 100644 index 00000000..c4b0f4e3 --- /dev/null +++ b/jcshepherd63.Flashcards/.gitignore @@ -0,0 +1,366 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +bin/ +obj/ +.vs/ +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Oo]ut/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd \ No newline at end of file diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards.slnx b/jcshepherd63.Flashcards/jcshepherd63.Flashcards.slnx new file mode 100644 index 00000000..cbc9c7f3 --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards.slnx @@ -0,0 +1,3 @@ + + + diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Controllers/FlashcardController.cs b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Controllers/FlashcardController.cs new file mode 100644 index 00000000..c4ca9ecf --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Controllers/FlashcardController.cs @@ -0,0 +1,41 @@ +using DTOs; +using FlashcardMethods; +using Spectre.Console; +using StackMethods; + +namespace FlashcardContr; + +public class FlashcardController +{ + public static void FlashcardDisplay() + { + Table table = new Table() + .DoubleBorder() + .BorderColor(Color.Blue) + .AddColumn("ID") + .AddColumn("Question") + .AddColumn("Answer"); + + var flashcards = FlashcardService.GetFlashcards(); + var count = 1; + foreach (var flashcard in flashcards) + { + table.AddRow(count.ToString(), flashcard.prompt.ToString(), flashcard.answer.ToString()); + count++; + } + AnsiConsole.Write(table); + } + + internal static string GetStackForFlashcard() + { + Console.Clear(); + List choices = StackService.GetStacks(); + var selection = AnsiConsole.Prompt( + new SelectionPrompt() + .Title("[yellow bold]Which stack does this flashcard belong to?[/]") + .AddChoices(choices)); + + + return selection.ToString(); + } +} diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Controllers/StackController.cs b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Controllers/StackController.cs new file mode 100644 index 00000000..81e77c14 --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Controllers/StackController.cs @@ -0,0 +1,22 @@ +using Spectre.Console; +using StackMethods; + + +namespace StacksController; + +public class StackController +{ + public static void StackDisplay() + { + Table table = new Table() + .DoubleBorder() + .BorderColor(Color.Blue) + .AddColumn("Stack Name"); + var stacks = StackService.GetStacks(); + foreach (var stack in stacks) + { + table.AddRow(stack.stackName); + } + AnsiConsole.Write(table); + } +} \ No newline at end of file diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/DTOs/FlashcardDTO.cs b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/DTOs/FlashcardDTO.cs new file mode 100644 index 00000000..1bc8dead --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/DTOs/FlashcardDTO.cs @@ -0,0 +1,13 @@ +namespace DTOs; + +internal class FlashcardDTO +{ + public int id { get; set; } + public string answer { get; set; } + public string prompt { get; set; } + + public override string ToString() + { + return prompt; + } +} diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/DTOs/StackDTO.cs b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/DTOs/StackDTO.cs new file mode 100644 index 00000000..65c96844 --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/DTOs/StackDTO.cs @@ -0,0 +1,11 @@ +namespace DTOs; + +internal class FlashcardStackDTO +{ + public string stackName { get; set; } + + public override string ToString() + { + return stackName.ToString(); + } +} diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Enums/FlashcardsEnum.cs b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Enums/FlashcardsEnum.cs new file mode 100644 index 00000000..15fd7253 --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Enums/FlashcardsEnum.cs @@ -0,0 +1,14 @@ +namespace MenuEnums; + +internal class FlashcardsEnum +{ + public enum FlashcardEnum + { + View_Flashcards, + Add_Flashcard, + Update_Flashcard, + Delete_Flashcard, + Return_To_Main_Menu + } +} + diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Enums/MainMenuEnum.cs b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Enums/MainMenuEnum.cs new file mode 100644 index 00000000..8f076486 --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Enums/MainMenuEnum.cs @@ -0,0 +1,13 @@ +namespace MenuEnums; + +internal class MainMenuEnum +{ + public enum MenuEnum + { + Study_Session_Menu, + FlashCards_Menu, + Stacks_Menu, + Close_Application + } +} + diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Enums/StacksEnum.cs b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Enums/StacksEnum.cs new file mode 100644 index 00000000..c2c6860d --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Enums/StacksEnum.cs @@ -0,0 +1,14 @@ +namespace MenuEnums; + +internal class StacksEnum +{ + public enum StackEnum + { + View_Stacks, + Add_Stack, + Update_Stack, + Delete_Stack, + Return_To_Main_Menu + } +} + diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Flashcards.App.DatabaseCreation.cs b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Flashcards.App.DatabaseCreation.cs new file mode 100644 index 00000000..0011560d --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Flashcards.App.DatabaseCreation.cs @@ -0,0 +1,17 @@ +using Microsoft.Extensions.Configuration; + +namespace DatabaseCreation; + +internal class DatabaseSetup +{ + public static string GetDbConnectionString() + { + var config = new ConfigurationBuilder() + .SetBasePath(Directory.GetCurrentDirectory()) + .AddJsonFile("appsettings.json") + .Build(); + + var connectionString = config.GetConnectionString("DefaultConnection"); + return connectionString; + } +} diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Models/Flashcard.cs b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Models/Flashcard.cs new file mode 100644 index 00000000..6ba1d535 --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Models/Flashcard.cs @@ -0,0 +1,27 @@ +namespace Models; + +internal class Flashcard +{ + public int id { get; set; } + public string answer { get; set; } + public string prompt { get; set; } + public int stackId { get; set; } + + public Flashcard() { } + + public Flashcard(string prompt, string answer, int stackId) + { + this.prompt = prompt; + this.answer = answer; + this.stackId = stackId; + } + + public Flashcard(int id, string prompt, string answer, int stackId) + { + this.id = id; + this.prompt = prompt; + this.answer = answer; + this.stackId = stackId; + } +} + diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Models/Stack.cs b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Models/Stack.cs new file mode 100644 index 00000000..e13d7cfa --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Models/Stack.cs @@ -0,0 +1,20 @@ +namespace Models; + +internal class FlashcardStack +{ + public int id { get; set; } + public string stackName { get; set; } + + public FlashcardStack() { } + + public FlashcardStack(string stackName) + { + this.stackName = stackName; + } + + public FlashcardStack(int id, string stackName) + { + this.id = id; + this.stackName = stackName; + } +} diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Models/StudySession.cs b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Models/StudySession.cs new file mode 100644 index 00000000..d2d6d02d --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Models/StudySession.cs @@ -0,0 +1,10 @@ +namespace Models; + +internal class StudySession +{ + public int id { get; set; } + public DateTime date { get; set; } + public int score { get; set; } + public int stackId { get; set; } + public int totalPossibleScore { get; set; } +} diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Program.cs b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Program.cs new file mode 100644 index 00000000..e8ea2702 --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Program.cs @@ -0,0 +1,11 @@ +using Menus; + +namespace jcshepherd63.Flashcards; + +internal class Program +{ + static void Main(string[] args) + { + MainMenu.MainMenuRouter(); + } +} diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/README.md b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/README.md new file mode 100644 index 00000000..04fd0821 --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/README.md @@ -0,0 +1,16 @@ +# Flashcard Application + +Features: + +SQL Server Database with the connection string stored in an appsettings.json file +Console built with Spectre for tidy user interaction + +Challenges: + +As the project size gets bigger, I find myself getting lost more often; however, I am trying to focus on cleanly organized code, so I have been able to figure it out every time. +I did not have to change the architecture of the application at all though once I got the basic structure so I was very happy about that. +Areas to Improve: + +I really need to improve my overall naming abilities. I kept getting confused by the names on my methods, properties, and variables. The KISS standard of keeping things simple should help with that going forward. +I also need to improve my understanding of the abstract keyword. +Finally, I need to do a better job of passing parameters into methods as opposed to setting them equal to a variable inside a method to make it accessible within. \ No newline at end of file diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Services/FlashcardService.cs b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Services/FlashcardService.cs new file mode 100644 index 00000000..a689eed0 --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Services/FlashcardService.cs @@ -0,0 +1,95 @@ +using DatabaseCreation; +using DTOs; +using Microsoft.Data.SqlClient; +using Models; +using Dapper; +using Spectre.Console; + +namespace FlashcardMethods; + +internal class FlashcardService +{ + public static List GetFlashcards() + { + List flashcards = new(); + using(var connection = new SqlConnection(DatabaseSetup.GetDbConnectionString())) + { + connection.Open(); + var getCmd = "SELECT * FROM Flashcards;"; + flashcards = connection.Query(getCmd).ToList(); + connection.Close(); + } + return flashcards; + } + + public static List GetFlashcardsByStackName(string stackName) + { + List flashcards = new(); + using(var connection = new SqlConnection(DatabaseSetup.GetDbConnectionString())) + { + connection.Open(); + var getCmd = @"SELECT f.* FROM Flashcards AS f + JOIN Stacks AS s ON f.stackId = s.id + WHERE s.stackName = @stackName;"; + flashcards = connection.Query(getCmd, new { stackName }).ToList(); + connection.Close(); + } + return flashcards; + } + + public static void AddFlashcard(Flashcard flashcard) + { + using (var connection = new SqlConnection(DatabaseSetup.GetDbConnectionString())) + { + connection.Open(); + var addCmd = "INSERT INTO Flashcards (answer, prompt, stackId) VALUES (@answer, @prompt, @stackId)"; + try + { + connection.Execute(addCmd, flashcard); + } + catch + { + Console.Clear(); + AnsiConsole.MarkupLine("[red bold]This stack does not exist currently. Please add the stack and try again.\n[/]"); + } + connection.Close(); + } + } + + public static void UpdateFlashcard(Flashcard flashcard) + { + using (var connection = new SqlConnection(DatabaseSetup.GetDbConnectionString())) + { + connection.Open(); + var updateCmd = @"UPDATE Flashcards SET + answer = @answer, + prompt = @prompt, + stackId = @stackId + WHERE id = @id;"; + connection.Execute(updateCmd, flashcard); + connection.Close(); + } + } + + public static void DeleteFlashcard(FlashcardDTO flashcard) + { + using(var connection = new SqlConnection(DatabaseSetup.GetDbConnectionString())) + { + connection.Open(); + var deleteCmd = "DELETE FROM Flashcards WHERE id = @id"; + connection.Execute(deleteCmd, flashcard); + connection.Close(); + } + } + + public static void DeleteFlashcardByStack(FlashcardStack stack) + { + using(var connection = new SqlConnection(DatabaseSetup.GetDbConnectionString())) + { + connection.Open(); + var deleteCmd = "DELETE FROM Flashcards WHERE stackId = @id;"; + connection.Execute(deleteCmd, stack); + connection.Close(); + } + } +} diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Services/StackService.cs b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Services/StackService.cs new file mode 100644 index 00000000..c20661ec --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Services/StackService.cs @@ -0,0 +1,71 @@ +using DatabaseCreation; +using DTOs; +using Dapper; +using Models; +using Microsoft.Data.SqlClient; + +namespace StackMethods; + +internal class StackService +{ + public static List GetStacks() + { + List stacks = new(); + using(var connection = new SqlConnection(DatabaseSetup.GetDbConnectionString())) + { + connection.Open(); + var getCmd = "SELECT * FROM Stacks;"; + stacks = connection.Query(getCmd).ToList(); + connection.Close(); + } + return stacks; + } + + public static void AddStack(FlashcardStack stack) + { + using(var connection = new SqlConnection(DatabaseSetup.GetDbConnectionString())) + { + connection.Open(); + var addCmd = "INSERT INTO Stacks (stackName) VALUES (@stackName);"; + connection.Execute(addCmd, stack); + connection.Close(); + } + } + + public static void UpdateStack(FlashcardStack stack) + { + using(var connection = new SqlConnection(DatabaseSetup.GetDbConnectionString())) + { + connection.Open(); + var updateCmd = @"UPDATE Stacks SET + stackName = @stackName + WHERE id = @id;"; + connection.Execute(updateCmd, stack); + connection.Close(); + } + } + + public static void DeleteStack(FlashcardStack stack) + { + using(var connection = new SqlConnection(DatabaseSetup.GetDbConnectionString())) + { + connection.Open(); + var deleteCmd = "DELETE FROM Stacks WHERE id = @id;"; + connection.Execute(deleteCmd, stack); + connection.Close(); + } + } + + public static int GetIdByStackName(string stackName) + { + int stackId; + using(var connection = new SqlConnection(DatabaseSetup.GetDbConnectionString())) + { + connection.Open(); + var getCmd = "SELECT id FROM Stacks WHERE stackName = @stackName"; + stackId = connection.QuerySingle(getCmd, new {stackName}); + connection.Close(); + } + return stackId; + } +} diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/StudyArea/StudyAreaService.cs b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/StudyArea/StudyAreaService.cs new file mode 100644 index 00000000..65558794 --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/StudyArea/StudyAreaService.cs @@ -0,0 +1,58 @@ +using Models; +using DTOs; +using Microsoft.Data.SqlClient; +using StudyArea; +using DatabaseCreation; +using Dapper; + +namespace StudyAreaCRUD; + +internal class StudyAreaService +{ + public static int GetStackId(string stackName) + { + using (var connection = new SqlConnection(DatabaseSetup.GetDbConnectionString())) + { + connection.Open(); + var getCmd = "SELECT id FROM Stacks WHERE stackName = @stackName"; + int stackId = connection.QuerySingle(getCmd, new {stackName = stackName}); + connection.Close(); + return stackId; + } + } + + public static void AddStudySession(StudySession session) + { + using(var connection = new SqlConnection(DatabaseSetup.GetDbConnectionString())) + { + connection.Open(); + var addCmd = "INSERT INTO Study_Sessions (date, score, stackId, totalPossibleScore) VALUES (@date, @score, @stackId, @totalPossibleScore)"; + connection.Execute(addCmd, session); + connection.Close(); + } + } + + public static List GetStudySessions() + { + using(var connection = new SqlConnection(DatabaseSetup.GetDbConnectionString())) + { + connection.Open(); + var getCmd = @"SELECT s.date, s.score, s.TotalPossibleScore, st.stackName FROM Study_Sessions AS s + JOIN Stacks AS st ON s.stackId = st.id"; + var studySessions = connection.Query(getCmd).ToList(); + connection.Close(); + return studySessions; + } + } + + public static void DeleteStudySessionByStack(FlashcardStack stack) + { + using(var connection = new SqlConnection(DatabaseSetup.GetDbConnectionString())) + { + connection.Open(); + var deleteCmd = "DELETE FROM Study_Sessions WHERE stackId = @id"; + connection.Execute(deleteCmd, stack); + connection.Close(); + } + } +} diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/StudyArea/StudySessionController.cs b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/StudyArea/StudySessionController.cs new file mode 100644 index 00000000..8b310509 --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/StudyArea/StudySessionController.cs @@ -0,0 +1,109 @@ +using FlashcardMethods; +using Models; +using Spectre.Console; +using StudyAreaCRUD; + +namespace StudyArea; + +internal class StudySessionController +{ + private static Table SetupTable() + { + var table = new Table() + .DoubleBorder() + .BorderColor(Color.Blue1); + + table.AddColumn("[yellow bold]Question#[/]"); + table.AddColumn("[yellow bold]Question[/]"); + + return table; + } + + private static Table SetupSessionViewerTable() + { + var table = new Table() + .DoubleBorder() + .BorderColor(Color.Blue); + table.AddColumn("Date"); + table.AddColumn("Score"); + table.AddColumn("Total Possible Score"); + table.AddColumn("Percent Correct"); + table.AddColumn("Stack"); + + return table; + } + + private static string CheckAnswer() + { + var answer = AnsiConsole.Ask("What is the answer for this flashcard?"); + return answer; + } + + public static (int, int) DisplayFlashcards(string stackName) + { + Console.Clear(); + var table = SetupTable(); + var flashcards = FlashcardService.GetFlashcardsByStackName(stackName); + var count = 1; + var totalCorrect = 0; + + foreach (var flashcard in flashcards) + { + table.AddRow(count.ToString(), flashcard.prompt); + count++; + AnsiConsole.Write(table); + var answer = CheckAnswer(); + if (answer.ToLower().Trim() == flashcard.answer.ToLower().Trim()) + { + Console.Clear(); + Console.WriteLine("Correct!"); + totalCorrect++; + Console.WriteLine($"{totalCorrect}/{flashcards.Count()}"); + } + else + { + Console.Clear(); + Console.WriteLine("Incorrect"); + Console.WriteLine($"{totalCorrect}/{flashcards.Count()}"); + } + + table.RemoveRow(0); + } + return (totalCorrect, count); + } + + public static StudySession ObjectCreation(int totalCorrect, int count, int stackId) + { + StudySession session = new(); + session.date = DateTime.Now; + session.score = totalCorrect; + session.totalPossibleScore = count - 1; + session.stackId = stackId; + return session; + } + + public static void ListStudySessions() + { + List sessions = StudyAreaService.GetStudySessions(); + + foreach(var session in sessions) + { + Console.WriteLine(session.ToString()); + } + } + + public static void DisplayStudySessions() + { + Console.Clear(); + Table table = SetupSessionViewerTable(); + List sessions = StudyAreaService.GetStudySessions(); + + foreach(var session in sessions) + { + double percentCorrect = (double)session.score / (double)session.totalPossibleScore; + table.AddRow(session.date.ToString(), session.score.ToString(), session.totalPossibleScore.ToString(), $"{percentCorrect:P2}", session.stackName); + } + + AnsiConsole.Write(table); + } +} diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/StudyArea/StudySessionDTO.cs b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/StudyArea/StudySessionDTO.cs new file mode 100644 index 00000000..78ca91db --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/StudyArea/StudySessionDTO.cs @@ -0,0 +1,14 @@ +namespace StudyArea; + +internal class StudySessionDTO +{ + public DateTime date { get; set; } + public int score { get; set; } + public string stackName { get; set; } + public int totalPossibleScore { get; set; } + + public override string ToString() + { + return $"Date: {date}\nScore: {score}\nTotal Possible Score: {totalPossibleScore}\nStack Name: {stackName}"; + } +} diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/StudyArea/StudySessionMenu.cs b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/StudyArea/StudySessionMenu.cs new file mode 100644 index 00000000..84f72a50 --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/StudyArea/StudySessionMenu.cs @@ -0,0 +1,71 @@ +using StackMethods; +using Menus; +using Spectre.Console; +using DTOs; +using StudyAreaCRUD; + +namespace StudyArea; + +internal class StudySessionMenu +{ + private static string StudySessionSelection() + { + Console.Clear(); + AnsiConsole.MarkupLine("[yellow bold]What would you like to do in the study area?\n[/]"); + + var selection = AnsiConsole.Prompt( + new SelectionPrompt() + .AddChoices("Study a stack of flashcards", "View past study sessions", "Go back to the Main Menu")); + + return selection; + } + + public static FlashcardStackDTO GetStackToStudy() + { + Console.Clear(); + List choices = StackService.GetStacks(); + var selection = AnsiConsole.Prompt( + new SelectionPrompt() + .Title("[yellow bold]Which stack would you like to study?[/]") + .AddChoices(choices)); + + + return selection; + } + + public static void StudySessionRouter() + { + var selection = StudySessionSelection(); + + switch (selection) + { + case "Study a stack of flashcards": + { + var stackName = GetStackToStudy().ToString(); + var stackId = StudyAreaService.GetStackId(stackName); + (int totalCount,int count) = StudySessionController.DisplayFlashcards(stackName); + var session = StudySessionController.ObjectCreation(totalCount, count, stackId); + StudyAreaService.AddStudySession(session); + ReturnToMainMenu(); + break; + } + case "View past study sessions": + { + StudySessionController.DisplayStudySessions(); + ReturnToMainMenu(); + break; + } + case "Go back to the Main Menu": + { + ReturnToMainMenu(); + break; + } + } + } + private static void ReturnToMainMenu() + { + AnsiConsole.MarkupLine("[red bold]PRESS ANY KEY TO RETURN TO MAIN MENU[/]"); + Console.ReadKey(); + MainMenu.MainMenuRouter(); + } +} diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Table Creation Script.sql b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Table Creation Script.sql new file mode 100644 index 00000000..8efe58b8 --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Table Creation Script.sql @@ -0,0 +1,23 @@ +BEGIN TRANSACTION; + +DROP TABLE IF EXISTS Flashcards; +DROP TABLE IF EXISTS Stacks; +DROP TABLE IF EXISTS Study_Sessions; + +CREATE TABLE Stacks ( +id INT IDENTITY PRIMARY KEY, +stackName NVARCHAR(50) NOT NULL UNIQUE); + +CREATE TABLE Flashcards ( +id INT IDENTITY PRIMARY KEY, +answer NVARCHAR(50), +prompt NVARCHAR(200) UNIQUE, +stackId INT NOT NULL FOREIGN KEY REFERENCES Stacks); + +CREATE TABLE Study_Sessions ( +id INT IDENTITY PRIMARY KEY, +date NVARCHAR(15) NOT NULL, +score INT NOT NULL, +stackId INT NOT NULL FOREIGN KEY REFERENCES Stacks); + +COMMIT; \ No newline at end of file diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Views/FlashcardMenu.cs b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Views/FlashcardMenu.cs new file mode 100644 index 00000000..05e675c4 --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Views/FlashcardMenu.cs @@ -0,0 +1,113 @@ +using FlashcardMethods; +using FlashcardContr; +using MenuEnums; +using Models; +using Spectre.Console; +using StackMethods; +using DTOs; + +namespace Menus; + +internal class FlashcardMenu +{ + private static Enum FlashcardMenuSelection() + { + Console.Clear(); + AnsiConsole.MarkupLine("[yellow bold underline]What would you like to do in the flashcard menu?\n[/]"); + + var selection = AnsiConsole.Prompt( + new SelectionPrompt() + .AddChoices(Enum.GetValues())); + + return selection; + } + + internal static void FlashcardMenuRouter() + { + var selection = FlashcardMenu.FlashcardMenuSelection(); + + switch (selection) + { + case FlashcardsEnum.FlashcardEnum.View_Flashcards: + { + FlashcardController.FlashcardDisplay(); + ReturnToMainMenu(); + break; + } + case FlashcardsEnum.FlashcardEnum.Add_Flashcard: + { + var prompt = GetFlashcardPrompt(); + var answer = GetFlashcardAnswer(); + var stackName = FlashcardController.GetStackForFlashcard(); + int stackId = StackService.GetIdByStackName(stackName); + Flashcard flashcard = new(prompt, answer, stackId); + FlashcardService.AddFlashcard(flashcard); + ReturnToMainMenu(); + break; + } + case FlashcardsEnum.FlashcardEnum.Update_Flashcard: + { + var card = GetFlashcardToUpdate(); + var prompt = GetFlashcardPrompt(); + var answer = GetFlashcardAnswer(); + var stackName = FlashcardController.GetStackForFlashcard(); + int stackId = StackService.GetIdByStackName(stackName); + Flashcard flashcard = new(card.id, prompt, answer, stackId); + FlashcardService.UpdateFlashcard(flashcard); + ReturnToMainMenu(); + break; + } + case FlashcardsEnum.FlashcardEnum.Delete_Flashcard: + { + var flashcardToDelete = GetFlashcardToDelete(); + FlashcardService.DeleteFlashcard(flashcardToDelete); + ReturnToMainMenu(); + break; + } + case FlashcardsEnum.FlashcardEnum.Return_To_Main_Menu: + { + MainMenu.MainMenuRouter(); + break; + } + } + } + + private static string GetFlashcardPrompt() + { + var prompt = AnsiConsole.Ask("[red italic]What question would you like this flashcard to display?[/]"); + return prompt; + } + + private static string GetFlashcardAnswer() + { + var answer = AnsiConsole.Ask("[red italic]What is the answer for this flashcard?[/]"); + return answer; + } + + private static FlashcardDTO GetFlashcardToUpdate() + { + List flashcards = FlashcardService.GetFlashcards(); + var answer = AnsiConsole.Prompt( + new SelectionPrompt() + .Title("[yellow bold]Which flashcard would you like to update?[/]") + .AddChoices(flashcards)); + return answer; + } + + private static FlashcardDTO GetFlashcardToDelete() + { + List flashcards = FlashcardService.GetFlashcards(); + var answer = AnsiConsole.Prompt( + new SelectionPrompt() + .Title("[yellow bold]Which flashcard would you like to Delete?[/]") + .AddChoices(flashcards)); + return answer; + } + + private static void ReturnToMainMenu() + { + AnsiConsole.MarkupLine("[red bold]PRESS ANY KEY TO RETURN TO MAIN MENU[/]"); + Console.ReadKey(); + MainMenu.MainMenuRouter(); + } +} diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Views/MainMenu.cs b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Views/MainMenu.cs new file mode 100644 index 00000000..01cc962d --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Views/MainMenu.cs @@ -0,0 +1,52 @@ +using MenuEnums; +using Spectre.Console; +using StudyArea; + +namespace Menus; + +internal class MainMenu +{ + private static Enum MainMenuSelection() + { + Console.Clear(); + AnsiConsole.MarkupLine("[yellow bold underline]Welcome to the Flashcard Application\n[/]"); + + var selection = AnsiConsole.Prompt( + new SelectionPrompt() + .Title("[yellow]Which section would you like to go to?[/]") + .AddChoices(Enum.GetValues())); + + return selection; + } + + public static void MainMenuRouter() + { + var selection = MainMenu.MainMenuSelection(); + + switch (selection) + { + case MainMenuEnum.MenuEnum.Study_Session_Menu: + { + StudySessionMenu.StudySessionRouter(); + break; + } + case MainMenuEnum.MenuEnum.FlashCards_Menu: + { + FlashcardMenu.FlashcardMenuRouter(); + break; + } + case MainMenuEnum.MenuEnum.Stacks_Menu: + { + StacksMenu.StacksMenuRouter(); + break; + } + case MainMenuEnum.MenuEnum.Close_Application: + { + break; + } + } + } + + +} + diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Views/StacksMenu.cs b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Views/StacksMenu.cs new file mode 100644 index 00000000..d09c8a29 --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/Views/StacksMenu.cs @@ -0,0 +1,107 @@ +using MenuEnums; +using Models; +using FlashcardMethods; +using StackMethods; +using Spectre.Console; +using StudyAreaCRUD; +using StacksController; +using DTOs; + +namespace Menus; + +internal class StacksMenu +{ + private static Enum StackMenuSelection() + { + var selection = AnsiConsole.Prompt( + new SelectionPrompt() + .AddChoices(Enum.GetValues())); + + return selection; + } + + public static void StacksMenuRouter() + { + var selection = StacksMenu.StackMenuSelection(); + + switch (selection) + { + case StacksEnum.StackEnum.View_Stacks: + { + StackController.StackDisplay(); + ReturnToMainMenu(); + break; + } + case StacksEnum.StackEnum.Add_Stack: + { + var name = GetStackName(); + FlashcardStack stack = new(name); + StackService.AddStack(stack); + ReturnToMainMenu(); + break; + } + case StacksEnum.StackEnum.Update_Stack: + { + var stackToUpdate = GetStackToUpdate(); + var id = StackService.GetIdByStackName(stackToUpdate.stackName); + var name = GetStackName(); + FlashcardStack stack = new(id, name); + StackService.UpdateStack(stack); + ReturnToMainMenu(); + break; + } + case StacksEnum.StackEnum.Delete_Stack: + { + FlashcardStack stackToDelete = new(); + var stack = GetStackToDelete(); + stackToDelete.id = StackService.GetIdByStackName(stack.stackName); + StudyAreaService.DeleteStudySessionByStack(stackToDelete); + FlashcardService.DeleteFlashcardByStack(stackToDelete); + StackService.DeleteStack(stackToDelete); + ReturnToMainMenu(); + break; + } + case StacksEnum.StackEnum.Return_To_Main_Menu: + { + MainMenu.MainMenuRouter(); + break; + } + } + } + + private static string GetStackName() + { + var name = AnsiConsole.Ask("[red italic]What is the name of this stack?[/]"); + return name; + } + + private static FlashcardStackDTO GetStackToUpdate() + { + List stacks = StackService.GetStacks(); + var answer = AnsiConsole.Prompt( + new SelectionPrompt() + .Title("[yellow bold]Which stack would you like to update?[/]") + .AddChoices(stacks)); + + return answer; + } + + private static FlashcardStackDTO GetStackToDelete() + { + List stacks = StackService.GetStacks(); + var answer = AnsiConsole.Prompt( + new SelectionPrompt() + .Title("[yellow bold]Which stack would you like to delete?[/]") + .AddChoices(stacks)); + + return answer; + } + + private static void ReturnToMainMenu() + { + AnsiConsole.MarkupLine("[red bold]PRESS ANY KEY TO RETURN TO MAIN MENU[/]"); + Console.ReadKey(); + MainMenu.MainMenuRouter(); + } +} + diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/appsettings.json b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/appsettings.json new file mode 100644 index 00000000..c5702287 --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/appsettings.json @@ -0,0 +1,5 @@ +{ + "ConnectionStrings": { + "DefaultConnection": "Server=(localdb)\\FlashcardAppLocalDb;Database=FlashcardApp;Trusted_Connection=True;Encrypt=False;" + } +} \ No newline at end of file diff --git a/jcshepherd63.Flashcards/jcshepherd63.Flashcards/jcshepherd63.Flashcards.csproj b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/jcshepherd63.Flashcards.csproj new file mode 100644 index 00000000..0282dea8 --- /dev/null +++ b/jcshepherd63.Flashcards/jcshepherd63.Flashcards/jcshepherd63.Flashcards.csproj @@ -0,0 +1,29 @@ + + + + Exe + net10.0 + enable + enable + + + + + + + + + + + + + + + + + + PreserveNewest + + + +