Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Task - Using CREATE | CRUD Operations with MySQL
Introduction to .NET with C#
course content

Kursinnhold

Introduction to .NET with C#

Introduction to .NET with C#

1. Introduction
2. Asynchronous Programming and Introduction to Web Services
3. Introduction to Databases with .NET
4. CRUD Operations with MySQL
5. Optimizing Database Operations

book
Task - Using CREATE

A grocery store's business is expanding, and they need an efficient way to keep track of their products. They hire you to make an application for them, which is based on a MySQL database where they can store and monitor all the products that they have in stock.

Your task is to write the C# code for:

  1. Connecting to your local MySQL database;

  2. Creating a new table called products with the following columns:

  • id: A column of type integer;

  • name: A string value up to 100 characters;

  • category: A string representing the category of the product. Can be up to 100 characters;

  • price: A float value representing the price;

  • stock_quantity: An integer representing the quantity of the product available in stock.

You can either create and connect to a new database or use an existing one.

Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 4. Kapittel 4

Spør AI

expand
ChatGPT

Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår

course content

Kursinnhold

Introduction to .NET with C#

Introduction to .NET with C#

1. Introduction
2. Asynchronous Programming and Introduction to Web Services
3. Introduction to Databases with .NET
4. CRUD Operations with MySQL
5. Optimizing Database Operations

book
Task - Using CREATE

A grocery store's business is expanding, and they need an efficient way to keep track of their products. They hire you to make an application for them, which is based on a MySQL database where they can store and monitor all the products that they have in stock.

Your task is to write the C# code for:

  1. Connecting to your local MySQL database;

  2. Creating a new table called products with the following columns:

  • id: A column of type integer;

  • name: A string value up to 100 characters;

  • category: A string representing the category of the product. Can be up to 100 characters;

  • price: A float value representing the price;

  • stock_quantity: An integer representing the quantity of the product available in stock.

You can either create and connect to a new database or use an existing one.

Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 4. Kapittel 4
Vi beklager at noe gikk galt. Hva skjedde?
some-alt