SWIMON
SWIMON
CC#
Created by SWIMON on 3/13/2025 in #help
How do I Retrieve a file in C#
I'm writing small CLI task-tracker program, according to the projects from roadmap.sh backend section. https://roadmap.sh/projects/task-tracker I need to retrieve and deserialize JSON file as part of the program. I suppose it wouldn't be good practice to manually copy and paste the path. In most tutorials I see something similar to the code snippet below for accessing the file.
var currentDirectory = Directory.GetCurrentDirectory();
var jsonFilePath = Path.Combine(currentDirectory, "Data","Tasks.json");
var currentDirectory = Directory.GetCurrentDirectory();
var jsonFilePath = Path.Combine(currentDirectory, "Data","Tasks.json");
for me GetCurrentDirecory() method returns following path: "~\source\repos\TaskTrackerCLI\TaskTrackerCLI\bin\Debug\net8.0" the Tasks.json file is inside Data folder, which is inside the project folder, as it should be. Can anyone tell me how I should retrieve the file, what am I doing wrong?
26 replies
CC#
Created by SWIMON on 2/27/2025 in #help
Is 87 hour asp.net course overkill for beginner
I'm going through a 87 hour course on Udemy, which I'll link below. There are small assignments at the end of every section, but nothing huge. I spend most time watching lectures. Am I wasting my time? Should I start doing projects now? Course - https://www.udemy.com/course/asp-net-core-true-ultimate-guide-real-project/
17 replies
CC#
Created by SWIMON on 10/12/2024 in #help
ASP.NET CORE MVC VS ASP.NET CORE WEB API
For someone who has has been learning React for a while, would you recommend I skip the MVC and focus solely on the Web apis, or should I still learn the fundamentals of MVC?
8 replies