-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
75 lines (67 loc) · 3 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
README for Bricks
Prerequisites
1. Visual Studio 2019 (With ASP.NET and web development installed)
2. MySQL Workbench 8.0 CE
Visual Studio Setup:
Installing Packages in Visual Studio 2019
1. Open the project in Visual Studio 2019
2. Open the "Solution Explorer"
3. Expand "Dependencies"
4. Right click "Packages" and select "Manage NuGet Packages"
5. Install the following packages in Visual Studio 2019:
- Microsoft.EntityFrameworkCore.SqlServer v3.1.8
- Microsoft.EntityFrameworkCore.Tools v3.1.8
- Microsoft.VisualStudio.Web.CodeGeneration.Des v3.1.4
- Newtonsoft.Json v12.0.3
- Pomelo.EntityFrameworkCore.MySql v3.2.3
- System.Net.Http.Json v3.2.1
Database:
Database Setup
1. Open MySQL Workbench 8.0 CE
2. Select a MySQL Connection
3. Create a schema call bricks
4. Expand the schema and right click on Tables and select "Create Table"
5. Name the table as pmiresidenceresult and click Apply
6. Copy and paste the following below in the SQL Script box and click Apply
CREATE TABLE `bricks`.`pmiresidenceresult` (
`idtransaction` int NOT NULL AUTO_INCREMENT,
`street` varchar(500) DEFAULT NULL,
`x` varchar(45) DEFAULT NULL,
`project` varchar(45) DEFAULT NULL,
`y` varchar(45) DEFAULT NULL,
`area` varchar(45) DEFAULT NULL,
`floorRange` varchar(45) DEFAULT NULL,
`noOfUnits` varchar(45) DEFAULT NULL,
`contractDate` varchar(45) DEFAULT NULL,
`typeOfSale` varchar(45) DEFAULT NULL,
`price` varchar(45) DEFAULT NULL,
`propertyType` varchar(45) DEFAULT NULL,
`district` varchar(45) DEFAULT NULL,
`typeOfArea` varchar(45) DEFAULT NULL,
`tenure` varchar(45) DEFAULT NULL,
`marketSegment` varchar(45) DEFAULT NULL,
PRIMARY KEY (`idtransaction`)
);
7. Check in the Navigator that the table has been created
Changing Database Connection to Your Local DB
1. Go to "appsettings.json" and change line 11 to your local DB username and password
2. Go to "PullData.cs" and change line 18 to your local DB username and password
3. Go to TimedHostedServices and change line 93 to your local DB username and password
Database and Ura API Information
We call the Ura API to send data to our database. The Ura API token refreshes every 24 hours.
To change the token:
1. Go to "UraService.cs" under Services file
2. Update the token in line 24 to a new token
3. If you require a new token, please contact [email protected]
4. Run the web application
5. Verify that the data is stored in MySQL Workbench
6. You can verify by running the following query in MySQL
select * from bricks.pmiresidenceresult
7. If you are unable to get the any data in database due to a expiration of token of incorrect setup of DB, please proceed to the section "Database using dumps"
Database using dumps
1. Connect to your MySQL database
2. Click "Server" on the tool bar
3. Select "Data Import"
4. Navigate the link to where the dumps file (bricks_pmiresidenceresult.sql) is located
5. Select the bricks schema to restore
6. Select "Start Import" on the bottom right