felon
Social Engagement Booster
2
MONTHS
2 2 MONTHS OF SERVICE
LEVEL 2
900 XP
If you are looking for a Simple Product Databases you are at the right place to deal with it. This tutorial will help you how to create a simple database in C#. This projects creates a list of data such as product name and product price. I have a sample code below.
Sample Code
Product Database Script
For the Project.json
Hope that this tutorial will help you a lot and thanks for reading this tutorial.
Don't forget to Like & Share This site www.sourcecodester.com
Download
Sample Code
Product Database Script
- using System;
- using System.Collections
.Generic
;
- using System.Linq
;
- using System.Text
;
- public class SimpleProductDatabase
- {
- public static
void
Main(
)
- {
- List<
string>
list =
new List<
string>
(
)
;
- list.Add
(
"Pizza Republic: P500"
)
;
- list.Add
(
"Greenoz Pizza: P500"
)
;
- list.Add
(
"Shakey's Pizza: P500"
)
;
- list.Add
(
"Greenwhich Pizza: P500"
)
;
- list.Add
(
"Yellow Cab Pizza: P500"
)
;
- for
(
int
n =
0
;
n <
list.Count
;
n++
)
- {
- string[
]
substring =
list[
n]
.Split
(
':'
)
;
- for
(
int
x =
0
;
x <
substring.Length
-
1
;
x++
)
- {
- Console.WriteLine
(
"Product Name : "
+
substring[
0
]
+
"Price - "
+
substring[
1
]
)
;
- }
- }
- }
- }
For the Project.json
- {
- "version"
:
"1.0.0-*"
,
- "buildOptions"
:
{
- "emitEntryPoint"
:
true
- }
,
- "dependencies"
:
{
- "Microsoft.NETCore.App"
:
{
- "version"
:
"1.0.0-rc2-3002702"
- }
- }
,
- "frameworks"
:
{
- "netcoreapp1.0"
:
{
- "imports"
:
"dnxcore50"
- }
- }
,
- "runtimes"
:
{
- "win7-x86"
:
{
}
- }
- }

Hope that this tutorial will help you a lot and thanks for reading this tutorial.
Don't forget to Like & Share This site www.sourcecodester.com
Download
You must upgrade your account or reply in the thread to view the hidden content.