Hi, I wanted to create an MVC application with Visual Studio and connect it to an SQL database, this application will have multiple entities like Customer, Products, Sales, and Store. All entities will be related to each other.
I need to create the front end and back end with the following details:
Requirements:
Back-end
- Create an MVC application that enables the CRUD (Create, Update, Delete) operations.
- Please add data annotations to the models
Front-end
- React JS components should be written using ES6 classes and jsx
- Create controlled components. Use state.
- Use AJAX inside React components to post to/get from the controller
- Please use plain javascript not typescript
- Use Semantic-UI-React modals in views

Vishal YelveRank #178 · 13.6K reputationPosted Apr 2, 2024, 2:21 AM EDT
Hi Neha,
do refer to my below articles
.Net core Web API crud
https://www.c-sharpcorner.com/article/net-core-3-1-web-api-crud/
React Js
https://www.c-sharpcorner.com/article/reactjs-crud-using-net-core-web-api/
Jayraj ChhayaRank #304 · 8.2K reputationPosted Apr 2, 2024, 2:11 AM EDT
To achieve this, you can start by setting up your MVC application in Visual Studio and connecting it to an SQL database. Here's a brief guide to help you get started:
Back-end (MVC Application)
public class Customer { [Key] public int CustomerId { get; set; } [Required] public string Name { get; set; } // Add other properties and annotations } // Repeat the above for Products, Sales, and Store modelsFront-end (React JS with ES6)
class CustomerComponent extends React.Component { constructor(props) { super(props); this.state = { customers: [] }; } // Implement methods to handle state changes }fetch('api/customers') .then(response => response.json()) .then(data => this.setState({ customers: data }));By following these steps, you can create a robust MVC application with SQL database integration and a React front-end that meets your requirements.