net core 8 journey
- Get link
- X
- Other Apps
C:\Users\bende\OneDrive\Projects\preview\hotel----rooms.com --not pretty got fed up because..
I did do one with controller action already, check on //erasumus
long term reviews > was a chatgpt attempt.
best one is makegtfs - contains a link to https://www.youtube.com/watch?v=J1f5b4vcxCQ&t=612s - this video suggests all classes be implemented as interfaces from the get go (for testing)
using the code aesthetic idea https://chatgpt.com/c/66dec509-9174-800c-a9d2-bb3a53a62d85
hotel floor plans is a hybrid vb.net DI and c# frontend. try on pc in henry's room when ready off eramus preview.. has compile error at this time.
How to setup the standard config
dotnet new
commands to create each component. While you don’t necessarily need a console app, creating one can be helpful if your background tasks are going to run outside the context of the MVC site.Here's how to get started:
Create a New Solution:
dotnet new sln -n YourSolutionName
Create an MVC Project:
dotnet new mvc -n YourMvcProject
This will create an ASP.NET Core MVC project.
Add the MVC Project to the Solution:
dotnet sln add YourMvcProject/YourMvcProject.csproj
Create a Class Library:
dotnet new classlib -n YourClassLib
This library can hold shared models, services, or any other code that you want to use across your application.
Add the Class Library to the Solution:
dotnet sln add YourClassLib/YourClassLib.csproj
(Optional) Create a Console App for Background Processing: If you want to run background processes independently of the MVC site, a console app is a good way to manage these tasks. Create a console app by running:
dotnet new console -n YourBackgroundWorker
This project can be used to handle background processes, such as data processing or periodic tasks.
Add the Console App to the Solution:
dotnet sln add YourBackgroundWorker/YourBackgroundWorker.csproj
Reference the Class Library in the MVC Project and Console App:
dotnet add YourMvcProject/YourMvcProject.csproj reference YourClassLib/YourClassLib.csproj dotnet add YourBackgroundWorker/YourBackgroundWorker.csproj reference YourClassLib/YourClassLib.csproj
Run the Solution: To start the MVC site:
dotnet run --project YourMvcProject
To start the console application (for background processing):
dotnet run --project YourBackgroundWorker
Using this structure, you have a flexible solution with a web app, shared code in a library, and an optional console application for background tasks. The MVC project itself could also host background processes by using hosted services if you prefer that approach.
How to run the apps in the solution
To view and edit your new solution in Visual Studio Code, follow these steps:
Open the Solution in Visual Studio Code:
- Navigate to the root directory of your solution (where your
.sln
file is located). - Open Visual Studio Code from this directory by running:
code .
- Navigate to the root directory of your solution (where your
Install Recommended Extensions: For C# development in VS Code, you'll want to install some extensions for a better experience:
- C# for Visual Studio Code (powered by OmniSharp): This provides C# IntelliSense, debugging, and project management.
- .NET Core Test Explorer (optional): If you have tests, this extension helps you run them within VS Code.
When you open the project, VS Code will often prompt you to install recommended extensions for C#. Follow the prompts or manually install them from the Extensions sidebar.
Workspace Setup:
- When you open VS Code, it will recognize your
.sln
file. This allows you to work with all the projects within your solution from a single VS Code workspace. - If you don't see all projects in the Explorer, make sure the workspace folder is open at the solution level, not within a specific project subfolder.
- When you open VS Code, it will recognize your
View and Edit Project Files:
- You can navigate through your project files using the Explorer sidebar in VS Code.
- Open files to view and edit them as you would with any text editor.
Run and Debug:
- In the Run and Debug sidebar (or press
F5
), you can configure launch settings for your projects. - If you opened the MVC project (
YourMvcProject
), VS Code should detect it as an ASP.NET Core project and set up a default debug configuration. - For the console app (
YourBackgroundWorker
), select it as your active project from the Run and Debug sidebar and configure any custom settings if needed.
- In the Run and Debug sidebar (or press
Build and Run from the Terminal:
- In VS Code, open a terminal (View > Terminal or `Ctrl+``) and run commands directly:dotnet build
dotnet run --project YourMvcProject dotnet run --project YourBackgroundWorker
- In VS Code, open a terminal (View > Terminal or `Ctrl+``) and run commands directly:
IntelliSense and Editing:
- With the C# extension installed, VS Code provides IntelliSense and autocompletion for your C# code.
- You can also use features like Go to Definition, Peek Definition, and Find All References, which help you navigate your codebase.
Tasks and Commands:
- VS Code's command palette (accessible with
Ctrl+Shift+P
) can be used to run tasks likebuild
,run
, andtest
. - Alternatively, you can create a
tasks.json
file under the.vscode
folder for custom build/run tasks.
Chrome Certificate Errors
- Get link
- X
- Other Apps
b*b* for sale in preview
ReplyDelete