https://github.com/janluksoft/aspnetcoremvc_3ef_mirabell
ASP.NET Core MVC project with EF. App is used to manage employee tasks
https://github.com/janluksoft/aspnetcoremvc_3ef_mirabell
asp-net-core-mvc c-sharp code-first dotnet ef-core entity-framework ms-sql mvc visual-studio
Last synced: 3 months ago
JSON representation
ASP.NET Core MVC project with EF. App is used to manage employee tasks
- Host: GitHub
- URL: https://github.com/janluksoft/aspnetcoremvc_3ef_mirabell
- Owner: janluksoft
- License: mit
- Created: 2022-12-13T20:57:09.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-12-13T21:27:20.000Z (over 2 years ago)
- Last Synced: 2025-01-13T21:45:19.338Z (4 months ago)
- Topics: asp-net-core-mvc, c-sharp, code-first, dotnet, ef-core, entity-framework, ms-sql, mvc, visual-studio
- Language: SCSS
- Homepage:
- Size: 2.06 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ASP.NET Core MVC 3 Mirabell
C# ASP.NET Core MVC project with EF. App is used to manage employee tasks.
## About the project
- The application is called Mirabell and is used to manage employee tasks;
- It is website application project 3;
- Website app works in ASP.NET Core MVC technology with Entity Framework;
- The data is stored in MS SQL data base;
- You can do CRUD operations on the Employees table and the Tasks table. The tables are linked;
- Partial views were also used;
- Application works on asynchronous operations.
## Working Mirabell app on cloud hosting
You can see Mirabell app running on [cloud hosting]( http://janluk-001-site1.dtempurl.com/Mirabell).
Logged in users can perform all operations. Others can view the data.## How does the application work?
The project has a main data class: [CompanyDBContext : DbContext]. This class contains two lists: DbSet, DbSet. On these lists, the application performs CRUD operations, and controllers through the Entity Framework save changes in the lists to the MS SQL database.
The project has three controllers, several view pages .cshtml, css style libraries and JavaScript libraries. So that the html pages have a similar layout, added _Layout.cshtml page. This file defines the backbone of all pages.## JavaScript
Actions on html pages are controlled by JavaScript functions grouped into two classes: [CDropDownOperations] and [CStatus]. They perform the following tasks:
- handle events from html controls;
- populate DropDown controls;
- they control the logic of choices;
- control line skips (accordion);
- initiate partial view reload;
- initiate the display of a modal form;## About ASP.NET Core MVC
ASP.NET Core MVC is a rich framework for building web apps and APIs using the Model-View-Controller design pattern.
The Model-View-Controller (MVC) architectural pattern separates an application into three main groups of components: Models, Views, and Controllers. This pattern helps to achieve separation of concerns. Using this pattern, user requests are routed to a Controller which is responsible for working with the Model to perform user actions and/or retrieve results of queries. The Controller chooses the View to display to the user, and provides it with any Model data it requires.

Above shows the diagram the three main components and which ones reference the others.
## Creating tables in MS-SQL
The Mirabel application works with the MS SQL Server database. For proper operation it requires:
- Creating two tables on MS-SQL: [Pracownicy] and [CTasks];
- You typed a good ConnectionString;Two tables need to be created and run 'SQL Server Management Studio' and run the script from [\DotNet5Crud\Mirabell_SQL_Create_tables.sql]. It will create two tables;
Next, enter the ConnectionString data into [appsettings.json] as shown in the figure below:
## Details
- Environment: VS2019
- Target: .NET5 (Core)
- Output type: Web Application
- ASP.NET Core MVC Entity Framework