Add project files.
This commit is contained in:
20
Accounting/Accounting.csproj
Normal file
20
Accounting/Accounting.csproj
Normal file
@ -0,0 +1,20 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.4" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.4" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.4">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
6
Accounting/Accounting.http
Normal file
6
Accounting/Accounting.http
Normal file
@ -0,0 +1,6 @@
|
||||
@Accounting_HostAddress = http://localhost:5125
|
||||
|
||||
GET {{Accounting_HostAddress}}/weatherforecast/
|
||||
Accept: application/json
|
||||
|
||||
###
|
||||
794
Accounting/Accounting133602807986318490.json
Normal file
794
Accounting/Accounting133602807986318490.json
Normal file
@ -0,0 +1,794 @@
|
||||
[
|
||||
{
|
||||
"BetalDatum": "2022-12-01T00:00:00",
|
||||
"Mottagare": "Kalles B\u00E4rplockning",
|
||||
"Konto": "BG 5787-1030",
|
||||
"Belopp": 10,
|
||||
"Avisering": "EInvoice",
|
||||
"Stored": "2024-04-02T00:00:00",
|
||||
"Id": 1
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2022-12-01T00:00:00",
|
||||
"Mottagare": "Nisses Strumpor",
|
||||
"Konto": "PG 4158502-7",
|
||||
"Belopp": 13,
|
||||
"Avisering": "EInvoice",
|
||||
"Stored": "2024-04-02T00:00:00",
|
||||
"Id": 2
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2024-04-02T00:00:00",
|
||||
"Mottagare": "STADSHYPOTEK",
|
||||
"Konto": "HS 10272130",
|
||||
"Belopp": 9134,
|
||||
"Avisering": "L\u00E5neavi",
|
||||
"Stored": "2024-04-02T23:08:31.5854247",
|
||||
"Id": 3
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2024-03-28T00:00:00",
|
||||
"Mottagare": "E.ON KUNDSUPPORT SVERIGE AB",
|
||||
"Konto": "Bg 5014-0045",
|
||||
"Belopp": 3193.64,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:31.803879",
|
||||
"Id": 4
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2024-03-28T00:00:00",
|
||||
"Mottagare": "TELE2",
|
||||
"Konto": "PG 4779202-3",
|
||||
"Belopp": 1126,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:31.8802848",
|
||||
"Id": 5
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2024-03-12T00:00:00",
|
||||
"Mottagare": "AMERICAN EXPRESS 3757",
|
||||
"Konto": "Bg 730-8596",
|
||||
"Belopp": 750.6,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:32.0682989",
|
||||
"Id": 6
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2024-03-01T00:00:00",
|
||||
"Mottagare": "STADSHYPOTEK",
|
||||
"Konto": "HS 10272130",
|
||||
"Belopp": 7713,
|
||||
"Avisering": "L\u00E5neavi",
|
||||
"Stored": "2024-04-02T23:08:32.3619655",
|
||||
"Id": 7
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2024-02-29T00:00:00",
|
||||
"Mottagare": "K\u00C4VLINGE KOMMUN, VA",
|
||||
"Konto": "Bg 5042-3441",
|
||||
"Belopp": 2792,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:32.4304824",
|
||||
"Id": 8
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2024-02-29T00:00:00",
|
||||
"Mottagare": "VERISURE SVERIGE",
|
||||
"Konto": "PG 4784604-3",
|
||||
"Belopp": 2235,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:32.5379999",
|
||||
"Id": 9
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2024-02-28T00:00:00",
|
||||
"Mottagare": "E.ON KUNDSUPPORT SVERIGE AB",
|
||||
"Konto": "Bg 5014-0045",
|
||||
"Belopp": 6088.05,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:32.6081638",
|
||||
"Id": 10
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2024-02-28T00:00:00",
|
||||
"Mottagare": "TELE2",
|
||||
"Konto": "PG 4779202-3",
|
||||
"Belopp": 1076,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:32.6823239",
|
||||
"Id": 11
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2024-02-12T00:00:00",
|
||||
"Mottagare": "AMERICAN EXPRESS 3757",
|
||||
"Konto": "Bg 730-8596",
|
||||
"Belopp": 778,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:32.9082626",
|
||||
"Id": 12
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2024-02-01T00:00:00",
|
||||
"Mottagare": "STADSHYPOTEK",
|
||||
"Konto": "HS 10272130",
|
||||
"Belopp": 7713,
|
||||
"Avisering": "L\u00E5neavi",
|
||||
"Stored": "2024-04-02T23:08:32.979415",
|
||||
"Id": 13
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2024-01-31T00:00:00",
|
||||
"Mottagare": "SVERIGES INGENJ\u00D6RER",
|
||||
"Konto": "Bg 626-3867",
|
||||
"Belopp": 456,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:33.051324",
|
||||
"Id": 14
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2024-01-31T00:00:00",
|
||||
"Mottagare": "TRANSPORTSTYRELSEN FORDONSSKATT",
|
||||
"Konto": "Bg 5051-6822",
|
||||
"Belopp": 3574,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:33.1245308",
|
||||
"Id": 15
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2024-01-29T00:00:00",
|
||||
"Mottagare": "TELE2",
|
||||
"Konto": "PG 4779202-3",
|
||||
"Belopp": 1076,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:33.3869051",
|
||||
"Id": 16
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2024-01-26T00:00:00",
|
||||
"Mottagare": "E.ON KUNDSUPPORT SVERIGE AB",
|
||||
"Konto": "Bg 5014-0045",
|
||||
"Belopp": 4395.13,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:33.5035807",
|
||||
"Id": 17
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2024-01-10T00:00:00",
|
||||
"Mottagare": "AMERICAN EXPRESS 3757",
|
||||
"Konto": "Bg 730-8596",
|
||||
"Belopp": 528,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:34.0027992",
|
||||
"Id": 18
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2024-01-02T00:00:00",
|
||||
"Mottagare": "STADSHYPOTEK",
|
||||
"Konto": "HS 10272130",
|
||||
"Belopp": 7713,
|
||||
"Avisering": "L\u00E5neavi",
|
||||
"Stored": "2024-04-02T23:08:34.0695214",
|
||||
"Id": 19
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-12-29T00:00:00",
|
||||
"Mottagare": "ECSTER - KONTO OCH KORT",
|
||||
"Konto": "Bg 847-2425",
|
||||
"Belopp": 0,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:34.171656",
|
||||
"Id": 20
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-12-28T00:00:00",
|
||||
"Mottagare": "E.ON KUNDSUPPORT SVERIGE AB",
|
||||
"Konto": "Bg 5014-0045",
|
||||
"Belopp": 3933.95,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:34.2446827",
|
||||
"Id": 21
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-12-28T00:00:00",
|
||||
"Mottagare": "Parkster / Billogram",
|
||||
"Konto": "Bg 809-2934",
|
||||
"Belopp": 12,
|
||||
"Avisering": "",
|
||||
"Stored": "2024-04-02T23:08:34.3207143",
|
||||
"Id": 22
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-12-28T00:00:00",
|
||||
"Mottagare": "TELE2",
|
||||
"Konto": "PG 4779202-3",
|
||||
"Belopp": 1081,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:34.4620778",
|
||||
"Id": 23
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-12-27T00:00:00",
|
||||
"Mottagare": "SYDSK\u00C5NES AVFALLSAKTIEBOLAG, SYSAV",
|
||||
"Konto": "Bg 5167-4562",
|
||||
"Belopp": 2118,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:34.5408654",
|
||||
"Id": 24
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-12-11T00:00:00",
|
||||
"Mottagare": "AMERICAN EXPRESS 3757",
|
||||
"Konto": "Bg 730-8596",
|
||||
"Belopp": 540,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:34.8925797",
|
||||
"Id": 25
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-12-01T00:00:00",
|
||||
"Mottagare": "STADSHYPOTEK",
|
||||
"Konto": "HS 10272130",
|
||||
"Belopp": 7469,
|
||||
"Avisering": "L\u00E5neavi",
|
||||
"Stored": "2024-04-02T23:08:35.1176472",
|
||||
"Id": 26
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-11-30T00:00:00",
|
||||
"Mottagare": "ECSTER - KONTO OCH KORT",
|
||||
"Konto": "Bg 847-2425",
|
||||
"Belopp": 258,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:35.1881171",
|
||||
"Id": 27
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-11-30T00:00:00",
|
||||
"Mottagare": "ST1 FINANCE MASTERCARD",
|
||||
"Konto": "PG 4779504-2",
|
||||
"Belopp": 0,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:35.2583748",
|
||||
"Id": 28
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-11-30T00:00:00",
|
||||
"Mottagare": "VERISURE SVERIGE",
|
||||
"Konto": "PG 4784604-3",
|
||||
"Belopp": 2038,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:35.3291064",
|
||||
"Id": 29
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-11-28T00:00:00",
|
||||
"Mottagare": "E.ON KUNDSUPPORT SVERIGE AB",
|
||||
"Konto": "Bg 5014-0045",
|
||||
"Belopp": 1741.11,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:35.4053446",
|
||||
"Id": 30
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-11-27T00:00:00",
|
||||
"Mottagare": "TELE2 SVERIGE AB",
|
||||
"Konto": "PG 4779202-3",
|
||||
"Belopp": 922,
|
||||
"Avisering": "",
|
||||
"Stored": "2024-04-02T23:08:35.516926",
|
||||
"Id": 31
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-11-10T00:00:00",
|
||||
"Mottagare": "AMERICAN EXPRESS 3757",
|
||||
"Konto": "Bg 730-8596",
|
||||
"Belopp": 2159,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:35.8048962",
|
||||
"Id": 32
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-11-01T00:00:00",
|
||||
"Mottagare": "STADSHYPOTEK",
|
||||
"Konto": "HS 10272130",
|
||||
"Belopp": 7469,
|
||||
"Avisering": "L\u00E5neavi",
|
||||
"Stored": "2024-04-02T23:08:35.8774917",
|
||||
"Id": 33
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-10-31T00:00:00",
|
||||
"Mottagare": "ECSTER - KONTO OCH KORT",
|
||||
"Konto": "Bg 847-2425",
|
||||
"Belopp": 866,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:35.9911849",
|
||||
"Id": 34
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-10-31T00:00:00",
|
||||
"Mottagare": "K\u00C4VLINGE KOMMUN, VA",
|
||||
"Konto": "Bg 5042-3441",
|
||||
"Belopp": 2364,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:36.0678674",
|
||||
"Id": 35
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-10-30T00:00:00",
|
||||
"Mottagare": "RESURS BANK AB (KUNDTJ\u00C4NST OCR)",
|
||||
"Konto": "Bg 5196-5770",
|
||||
"Belopp": 6172.79,
|
||||
"Avisering": "",
|
||||
"Stored": "2024-04-02T23:08:36.1802812",
|
||||
"Id": 36
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-10-30T00:00:00",
|
||||
"Mottagare": "ST1 FINANCE MASTERCARD",
|
||||
"Konto": "PG 4779504-2",
|
||||
"Belopp": 0.67,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:36.2493892",
|
||||
"Id": 37
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-10-27T00:00:00",
|
||||
"Mottagare": "E.ON F\u00D6RS\u00C4LJNING SVERIGE AB",
|
||||
"Konto": "Bg 5014-0045",
|
||||
"Belopp": 2695.9,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:36.3216939",
|
||||
"Id": 38
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-10-27T00:00:00",
|
||||
"Mottagare": "MIMMIE \u00C5KESSON AB",
|
||||
"Konto": "PG 987606-1",
|
||||
"Belopp": 750,
|
||||
"Avisering": "",
|
||||
"Stored": "2024-04-02T23:08:36.3987714",
|
||||
"Id": 39
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-10-26T00:00:00",
|
||||
"Mottagare": "VERISURE SVERIGE",
|
||||
"Konto": "PG 4784604-3",
|
||||
"Belopp": 7534,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:36.4646701",
|
||||
"Id": 40
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-10-24T00:00:00",
|
||||
"Mottagare": "ERIKS F\u00D6NSTERPUTS",
|
||||
"Konto": "Bg 5787-1030",
|
||||
"Belopp": 270,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:36.5796039",
|
||||
"Id": 41
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-10-11T00:00:00",
|
||||
"Mottagare": "AMERICAN EXPRESS 3757",
|
||||
"Konto": "Bg 730-8596",
|
||||
"Belopp": 1570.47,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:36.9017022",
|
||||
"Id": 42
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-10-02T00:00:00",
|
||||
"Mottagare": "ST1 FINANCE MASTERCARD",
|
||||
"Konto": "PG 4779504-2",
|
||||
"Belopp": 1523.06,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:37.1042756",
|
||||
"Id": 43
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-10-02T00:00:00",
|
||||
"Mottagare": "STADSHYPOTEK",
|
||||
"Konto": "HS 10272130",
|
||||
"Belopp": 7469,
|
||||
"Avisering": "L\u00E5neavi",
|
||||
"Stored": "2024-04-02T23:08:37.1826572",
|
||||
"Id": 44
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-10-02T00:00:00",
|
||||
"Mottagare": "TRANSPORTSTYRELSEN FORDONSSKATT",
|
||||
"Konto": "Bg 5051-6822",
|
||||
"Belopp": 3574,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:37.2561607",
|
||||
"Id": 45
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-09-29T00:00:00",
|
||||
"Mottagare": "ECSTER - KONTO OCH KORT",
|
||||
"Konto": "Bg 847-2425",
|
||||
"Belopp": 4372,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:37.3326304",
|
||||
"Id": 46
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-09-29T00:00:00",
|
||||
"Mottagare": "MIMMIE \u00C5KESSON AB",
|
||||
"Konto": "PG 987606-1",
|
||||
"Belopp": 900,
|
||||
"Avisering": "",
|
||||
"Stored": "2024-04-02T23:08:37.4091976",
|
||||
"Id": 47
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-09-29T00:00:00",
|
||||
"Mottagare": "RESURS BANK AB (KUNDTJ\u00C4NST OCR)",
|
||||
"Konto": "Bg 5196-5770",
|
||||
"Belopp": 389,
|
||||
"Avisering": "",
|
||||
"Stored": "2024-04-02T23:08:37.4749576",
|
||||
"Id": 48
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-09-28T00:00:00",
|
||||
"Mottagare": "E.ON F\u00D6RS\u00C4LJNING SVERIGE AB",
|
||||
"Konto": "Bg 5014-0045",
|
||||
"Belopp": 3397,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:37.5410832",
|
||||
"Id": 49
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-09-28T00:00:00",
|
||||
"Mottagare": "TELE2 SVERIGE AB",
|
||||
"Konto": "PG 4779202-3",
|
||||
"Belopp": 1427,
|
||||
"Avisering": "",
|
||||
"Stored": "2024-04-02T23:08:37.6215296",
|
||||
"Id": 50
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-09-27T00:00:00",
|
||||
"Mottagare": "Parkster / Billogram",
|
||||
"Konto": "Bg 809-2934",
|
||||
"Belopp": 116,
|
||||
"Avisering": "",
|
||||
"Stored": "2024-04-02T23:08:37.6911932",
|
||||
"Id": 51
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-09-27T00:00:00",
|
||||
"Mottagare": "WALLEY",
|
||||
"Konto": "PG 4177404-3",
|
||||
"Belopp": 278,
|
||||
"Avisering": "",
|
||||
"Stored": "2024-04-02T23:08:37.7557707",
|
||||
"Id": 52
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-09-26T00:00:00",
|
||||
"Mottagare": "EON Kundsupport Sverige AB",
|
||||
"Konto": "Bg 5014-0045",
|
||||
"Belopp": 197907,
|
||||
"Avisering": "",
|
||||
"Stored": "2024-04-02T23:08:37.8587698",
|
||||
"Id": 53
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-09-14T00:00:00",
|
||||
"Mottagare": "Swimmingpool i Helsingborg AB",
|
||||
"Konto": "Bg 346-5101",
|
||||
"Belopp": 1295,
|
||||
"Avisering": "Renovering",
|
||||
"Stored": "2024-04-02T23:08:38.1686459",
|
||||
"Id": 54
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-09-13T00:00:00",
|
||||
"Mottagare": "FOLKSAM",
|
||||
"Konto": "Bg 5338-7643",
|
||||
"Belopp": 4855,
|
||||
"Avisering": "",
|
||||
"Stored": "2024-04-02T23:08:38.28401",
|
||||
"Id": 55
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-09-12T00:00:00",
|
||||
"Mottagare": "ERIKS F\u00D6NSTERPUTS",
|
||||
"Konto": "Bg 5787-1030",
|
||||
"Belopp": 270,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:38.3925135",
|
||||
"Id": 56
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-09-11T00:00:00",
|
||||
"Mottagare": "AMERICAN EXPRESS 3757",
|
||||
"Konto": "Bg 730-8596",
|
||||
"Belopp": 587.99,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:38.5152781",
|
||||
"Id": 57
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-09-11T00:00:00",
|
||||
"Mottagare": "TELE2 SVERIGE AB",
|
||||
"Konto": "PG 4779202-3",
|
||||
"Belopp": 270,
|
||||
"Avisering": "",
|
||||
"Stored": "2024-04-02T23:08:38.5936699",
|
||||
"Id": 58
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-09-08T00:00:00",
|
||||
"Mottagare": "MSW SERVICEBOLAG I L\u00D6DDE AB",
|
||||
"Konto": "Bg 5692-0341",
|
||||
"Belopp": 3272,
|
||||
"Avisering": "",
|
||||
"Stored": "2024-04-02T23:08:38.6979559",
|
||||
"Id": 59
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-09-04T00:00:00",
|
||||
"Mottagare": "IF SKADEF\u00D6RS\u00C4KRING AB",
|
||||
"Konto": "Bg 5270-6009",
|
||||
"Belopp": 71,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:38.8132209",
|
||||
"Id": 60
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-09-01T00:00:00",
|
||||
"Mottagare": "FOLKSAM",
|
||||
"Konto": "Bg 5338-7643",
|
||||
"Belopp": 569,
|
||||
"Avisering": "",
|
||||
"Stored": "2024-04-02T23:08:38.9412246",
|
||||
"Id": 61
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-09-01T00:00:00",
|
||||
"Mottagare": "Qliro AB",
|
||||
"Konto": "Bg 233-0470",
|
||||
"Belopp": 904,
|
||||
"Avisering": "",
|
||||
"Stored": "2024-04-02T23:08:39.0078098",
|
||||
"Id": 62
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-09-01T00:00:00",
|
||||
"Mottagare": "STADSHYPOTEK",
|
||||
"Konto": "HS 10272130",
|
||||
"Belopp": 7226,
|
||||
"Avisering": "L\u00E5neavi",
|
||||
"Stored": "2024-04-02T23:08:39.1149521",
|
||||
"Id": 63
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-08-31T00:00:00",
|
||||
"Mottagare": "ECSTER - KONTO OCH KORT",
|
||||
"Konto": "Bg 847-2425",
|
||||
"Belopp": 317,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:39.2340357",
|
||||
"Id": 64
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-08-31T00:00:00",
|
||||
"Mottagare": "VERISURE SVERIGE",
|
||||
"Konto": "PG 4784604-3",
|
||||
"Belopp": 1978,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:39.4818858",
|
||||
"Id": 65
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-08-30T00:00:00",
|
||||
"Mottagare": "RESURS BANK AB (KUNDTJ\u00C4NST OCR)",
|
||||
"Konto": "Bg 5196-5770",
|
||||
"Belopp": 6802,
|
||||
"Avisering": "",
|
||||
"Stored": "2024-04-02T23:08:39.613796",
|
||||
"Id": 66
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-08-30T00:00:00",
|
||||
"Mottagare": "ST1 FINANCE MASTERCARD",
|
||||
"Konto": "PG 4779504-2",
|
||||
"Belopp": 0,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:39.6834344",
|
||||
"Id": 67
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-08-29T00:00:00",
|
||||
"Mottagare": "TELE2 SVERIGE AB",
|
||||
"Konto": "PG 4779202-3",
|
||||
"Belopp": 262,
|
||||
"Avisering": "",
|
||||
"Stored": "2024-04-02T23:08:39.7703581",
|
||||
"Id": 68
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-08-28T00:00:00",
|
||||
"Mottagare": "E.ON F\u00D6RS\u00C4LJNING SVERIGE AB",
|
||||
"Konto": "Bg 5014-0045",
|
||||
"Belopp": 1570,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:39.8447923",
|
||||
"Id": 69
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-08-28T00:00:00",
|
||||
"Mottagare": "Parkster / Billogram",
|
||||
"Konto": "Bg 809-2934",
|
||||
"Belopp": 56,
|
||||
"Avisering": "",
|
||||
"Stored": "2024-04-02T23:08:39.9259751",
|
||||
"Id": 70
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-08-21T00:00:00",
|
||||
"Mottagare": "TELE2 SVERIGE AB",
|
||||
"Konto": "PG 4779202-3",
|
||||
"Belopp": 498,
|
||||
"Avisering": "",
|
||||
"Stored": "2024-04-02T23:08:40.3496796",
|
||||
"Id": 71
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-08-10T00:00:00",
|
||||
"Mottagare": "AMERICAN EXPRESS 3757",
|
||||
"Konto": "Bg 730-8596",
|
||||
"Belopp": 276,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:40.5548091",
|
||||
"Id": 72
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-08-03T00:00:00",
|
||||
"Mottagare": "IF SKADEF\u00D6RS\u00C4KRING AB",
|
||||
"Konto": "Bg 5270-6009",
|
||||
"Belopp": 71,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:40.7709281",
|
||||
"Id": 73
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-08-02T00:00:00",
|
||||
"Mottagare": "KLARNA BANK AB",
|
||||
"Konto": "PG 4158502-7",
|
||||
"Belopp": 348,
|
||||
"Avisering": "",
|
||||
"Stored": "2024-04-02T23:08:40.9505912",
|
||||
"Id": 74
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-08-01T00:00:00",
|
||||
"Mottagare": "STADSHYPOTEK",
|
||||
"Konto": "HS 10272130",
|
||||
"Belopp": 7226,
|
||||
"Avisering": "L\u00E5neavi",
|
||||
"Stored": "2024-04-02T23:08:41.1145884",
|
||||
"Id": 75
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-07-31T00:00:00",
|
||||
"Mottagare": "ECSTER - KONTO OCH KORT",
|
||||
"Konto": "Bg 847-2425",
|
||||
"Belopp": 2224,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:41.1964999",
|
||||
"Id": 76
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-07-31T00:00:00",
|
||||
"Mottagare": "ST1 FINANCE MASTERCARD",
|
||||
"Konto": "PG 4779504-2",
|
||||
"Belopp": 2457.29,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:41.3335418",
|
||||
"Id": 77
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-07-28T00:00:00",
|
||||
"Mottagare": "E.ON F\u00D6RS\u00C4LJNING SVERIGE AB",
|
||||
"Konto": "Bg 5014-0045",
|
||||
"Belopp": 1940,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:41.4181022",
|
||||
"Id": 78
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-07-28T00:00:00",
|
||||
"Mottagare": "MIMMIE \u00C5KESSON AB",
|
||||
"Konto": "PG 987606-1",
|
||||
"Belopp": 900,
|
||||
"Avisering": "",
|
||||
"Stored": "2024-04-02T23:08:41.5071014",
|
||||
"Id": 79
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-07-28T00:00:00",
|
||||
"Mottagare": "Solid F\u00F6rs\u00E4krings AB",
|
||||
"Konto": "Bg 840-4022",
|
||||
"Belopp": 279,
|
||||
"Avisering": "",
|
||||
"Stored": "2024-04-02T23:08:41.5897675",
|
||||
"Id": 80
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-07-28T00:00:00",
|
||||
"Mottagare": "VATTENFALL KUNDSERVICE AB",
|
||||
"Konto": "Bg 5110-8348",
|
||||
"Belopp": 8812.54,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:41.6613685",
|
||||
"Id": 81
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-07-27T00:00:00",
|
||||
"Mottagare": "ERIKS F\u00D6NSTERPUTS",
|
||||
"Konto": "Bg 5787-1030",
|
||||
"Belopp": 270,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:41.7472615",
|
||||
"Id": 82
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-07-11T00:00:00",
|
||||
"Mottagare": "AMERICAN EXPRESS 3757",
|
||||
"Konto": "Bg 730-8596",
|
||||
"Belopp": 276,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:42.1000847",
|
||||
"Id": 83
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-07-03T00:00:00",
|
||||
"Mottagare": "IF SKADEF\u00D6RS\u00C4KRING AB",
|
||||
"Konto": "Bg 5270-6009",
|
||||
"Belopp": 71,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:08:42.3248464",
|
||||
"Id": 84
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2023-07-03T00:00:00",
|
||||
"Mottagare": "STADSHYPOTEK",
|
||||
"Konto": "HS 10272130",
|
||||
"Belopp": 7226,
|
||||
"Avisering": "L\u00E5neavi",
|
||||
"Stored": "2024-04-02T23:08:42.4527035",
|
||||
"Id": 85
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2024-04-09T00:00:00",
|
||||
"Mottagare": "ERIKS F\u00D6NSTERPUTS",
|
||||
"Konto": "Bg 5787-1030",
|
||||
"Belopp": 280,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:14:48.5446436",
|
||||
"Id": 86
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2024-04-10T00:00:00",
|
||||
"Mottagare": "AMERICAN EXPRESS 3757",
|
||||
"Konto": "Bg 730-8596",
|
||||
"Belopp": 1077,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:14:48.6022309",
|
||||
"Id": 87
|
||||
},
|
||||
{
|
||||
"BetalDatum": "2024-04-30T00:00:00",
|
||||
"Mottagare": "FOLKSAM",
|
||||
"Konto": "Bg 5338-7643",
|
||||
"Belopp": 6550,
|
||||
"Avisering": "E-faktura",
|
||||
"Stored": "2024-04-02T23:14:48.6554474",
|
||||
"Id": 88
|
||||
}
|
||||
]
|
||||
126
Accounting/Controllers/AccountingController.cs
Normal file
126
Accounting/Controllers/AccountingController.cs
Normal file
@ -0,0 +1,126 @@
|
||||
using Accounting.Data;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
namespace Accounting.Controllers;
|
||||
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class AccountingController : ControllerBase
|
||||
{
|
||||
private readonly DataContext _context;
|
||||
|
||||
public AccountingController(DataContext dataContext)
|
||||
{
|
||||
_context = dataContext;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public async Task<ActionResult<List<AccountRecord>>> GetAllAccRecords()
|
||||
{
|
||||
|
||||
var accRecords = await _context.AccountRecords.ToListAsync();
|
||||
|
||||
return Ok(accRecords);
|
||||
|
||||
|
||||
|
||||
//var accRecords = new List<AccountRecord>{
|
||||
// new AccountRecord {
|
||||
// Id = 1,
|
||||
// Avisering = "Efaktura",
|
||||
// Belopp = 250.50D,
|
||||
// BetalDatum = DateTime.Parse("2024-05-30"),
|
||||
// Konto = "1234-5678",
|
||||
// Mottagare = "Tele2",
|
||||
// Stored = DateTime.Now
|
||||
// }
|
||||
//};
|
||||
}
|
||||
|
||||
[HttpGet("{id}")]
|
||||
public async Task<ActionResult<AccountRecord>> GetAccountRecord(int id)
|
||||
{
|
||||
var accRecord = await _context.AccountRecords.FindAsync(id);
|
||||
if (accRecord is null)
|
||||
return NotFound("AccountRecord not found");
|
||||
|
||||
return Ok(accRecord);
|
||||
}
|
||||
|
||||
[HttpPost("Addrecord")]
|
||||
public async Task<ActionResult<List<AccountRecord>>> AddAccRecord(AccountRecord accRecord)
|
||||
{
|
||||
_context.AccountRecords.Add(accRecord);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return Ok(await _context.AccountRecords.ToListAsync());
|
||||
}
|
||||
|
||||
|
||||
[HttpPost("AddAccRecordsFromJson/{jsonFile}")]
|
||||
public async Task<ActionResult<List<AccountRecord>>> AddAccRecordsFromJson(string jsonFile)
|
||||
{
|
||||
var jsonText = await System.IO.File.ReadAllTextAsync(jsonFile);
|
||||
|
||||
var accRecords = JsonConvert.DeserializeObject<List<AccountRecord>>(jsonText);
|
||||
|
||||
if (accRecords == null)
|
||||
return BadRequest($"File not found : {jsonText}");
|
||||
|
||||
|
||||
using (var transaction = _context.Database.BeginTransaction())
|
||||
{
|
||||
try
|
||||
{
|
||||
await _context.Database.ExecuteSqlRawAsync("SET IDENTITY_INSERT dbo.AccountRecords ON");
|
||||
await _context.AccountRecords.AddRangeAsync(accRecords);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
await _context.Database.ExecuteSqlRawAsync("SET IDENTITY_INSERT dbo.AccountRecords OFF");
|
||||
transaction.Commit();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
transaction.Rollback();
|
||||
return BadRequest($"Error in call {ex.Message}");
|
||||
}
|
||||
|
||||
}
|
||||
return Ok(await _context.AccountRecords.ToListAsync());
|
||||
}
|
||||
|
||||
|
||||
|
||||
[HttpPut]
|
||||
public async Task<ActionResult<List<AccountRecord>>> UpdateAccRecord(AccountRecord updatedAccRecord)
|
||||
{
|
||||
var accRecord = await _context.AccountRecords.FindAsync(updatedAccRecord.Id);
|
||||
if (accRecord is null)
|
||||
return NotFound("Record not found");
|
||||
|
||||
accRecord.Stored = updatedAccRecord.Stored;
|
||||
accRecord.BetalDatum = updatedAccRecord.BetalDatum;
|
||||
accRecord.Avisering = updatedAccRecord.Avisering;
|
||||
accRecord.Mottagare = updatedAccRecord.Mottagare;
|
||||
accRecord.Belopp = updatedAccRecord.Belopp;
|
||||
accRecord.Konto = updatedAccRecord.Konto;
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return Ok(await _context.AccountRecords.ToListAsync());
|
||||
}
|
||||
|
||||
[HttpDelete]
|
||||
public async Task<ActionResult<List<AccountRecord>>> DeleteAccRecord(int id)
|
||||
{
|
||||
var AccRecord = await _context.AccountRecords.FindAsync(id);
|
||||
if (AccRecord is null)
|
||||
return NotFound("AccRecord not found");
|
||||
|
||||
_context.AccountRecords.Remove(AccRecord);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return Ok(await _context.AccountRecords.ToListAsync());
|
||||
}
|
||||
}
|
||||
33
Accounting/Controllers/WeatherForecastController.cs
Normal file
33
Accounting/Controllers/WeatherForecastController.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Accounting.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("[controller]")]
|
||||
public class WeatherForecastController : ControllerBase
|
||||
{
|
||||
private static readonly string[] Summaries = new[]
|
||||
{
|
||||
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
||||
};
|
||||
|
||||
private readonly ILogger<WeatherForecastController> _logger;
|
||||
|
||||
public WeatherForecastController(ILogger<WeatherForecastController> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
[HttpGet(Name = "GetWeatherForecast")]
|
||||
public IEnumerable<WeatherForecast> Get()
|
||||
{
|
||||
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
|
||||
{
|
||||
Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
|
||||
TemperatureC = Random.Shared.Next(-20, 55),
|
||||
Summary = Summaries[Random.Shared.Next(Summaries.Length)]
|
||||
})
|
||||
.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
10
Accounting/Data/DataContext.cs
Normal file
10
Accounting/Data/DataContext.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace Accounting.Data;
|
||||
|
||||
public class DataContext : DbContext
|
||||
{
|
||||
public DataContext(DbContextOptions options) : base(options)
|
||||
{
|
||||
}
|
||||
|
||||
public DbSet<AccountRecord> AccountRecords { get; set; }
|
||||
}
|
||||
12
Accounting/Entities/AccountRecord.cs
Normal file
12
Accounting/Entities/AccountRecord.cs
Normal file
@ -0,0 +1,12 @@
|
||||
namespace Accounting.Entities;
|
||||
|
||||
public class AccountRecord : BaseEntity
|
||||
{
|
||||
public DateTime BetalDatum { get; set; } = DateTime.MinValue;
|
||||
public string Mottagare { get; set; } = string.Empty;
|
||||
public string Konto { get; set; } = string.Empty;
|
||||
public double Belopp { get; set; }
|
||||
public string Avisering { get; set; } = string.Empty;
|
||||
public DateTime Stored { get; set; } = DateTime.Now.ToLocalTime();
|
||||
|
||||
}
|
||||
7
Accounting/Entities/Common/BaseEntity.cs
Normal file
7
Accounting/Entities/Common/BaseEntity.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace Accounting.Entities.Common;
|
||||
|
||||
public abstract class BaseEntity
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
}
|
||||
12
Accounting/GlobalUsings.cs
Normal file
12
Accounting/GlobalUsings.cs
Normal file
@ -0,0 +1,12 @@
|
||||
global using Accounting.Entities;
|
||||
global using Accounting.Entities.Common;
|
||||
global using Microsoft.AspNetCore.Mvc;
|
||||
global using Microsoft.EntityFrameworkCore;
|
||||
global using System.ComponentModel.DataAnnotations;
|
||||
|
||||
|
||||
namespace Accounting;
|
||||
|
||||
public class GlobalUsings
|
||||
{
|
||||
}
|
||||
64
Accounting/Migrations/20240429161713_Initial.Designer.cs
generated
Normal file
64
Accounting/Migrations/20240429161713_Initial.Designer.cs
generated
Normal file
@ -0,0 +1,64 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Accounting.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Accounting.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20240429161713_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "8.0.4")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Accounting.Entities.AccountRecord", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Avisering")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<double>("Belopp")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<DateTime>("BetalDatum")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Konto")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Mottagare")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("Stored")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AccountRecords");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
40
Accounting/Migrations/20240429161713_Initial.cs
Normal file
40
Accounting/Migrations/20240429161713_Initial.cs
Normal file
@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Accounting.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Initial : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AccountRecords",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
BetalDatum = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
Mottagare = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Konto = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Belopp = table.Column<double>(type: "float", nullable: false),
|
||||
Avisering = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Stored = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AccountRecords", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "AccountRecords");
|
||||
}
|
||||
}
|
||||
}
|
||||
61
Accounting/Migrations/DataContextModelSnapshot.cs
Normal file
61
Accounting/Migrations/DataContextModelSnapshot.cs
Normal file
@ -0,0 +1,61 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Accounting.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Accounting.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
partial class DataContextModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "8.0.4")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Accounting.Entities.AccountRecord", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Avisering")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<double>("Belopp")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<DateTime>("BetalDatum")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Konto")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Mottagare")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("Stored")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AccountRecords");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
32
Accounting/Program.cs
Normal file
32
Accounting/Program.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using Accounting.Data;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
|
||||
builder.Services.AddControllers();
|
||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen();
|
||||
|
||||
builder.Services.AddDbContext<DataContext>(options =>
|
||||
{
|
||||
options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection"));
|
||||
});
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI();
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
app.Run();
|
||||
41
Accounting/Properties/launchSettings.json
Normal file
41
Accounting/Properties/launchSettings.json
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
"$schema": "http://json.schemastore.org/launchsettings.json",
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:29266",
|
||||
"sslPort": 44331
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"http": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "http://localhost:5125",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"https": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "https://localhost:7173;http://localhost:5125",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
13
Accounting/WeatherForecast.cs
Normal file
13
Accounting/WeatherForecast.cs
Normal file
@ -0,0 +1,13 @@
|
||||
namespace Accounting
|
||||
{
|
||||
public class WeatherForecast
|
||||
{
|
||||
public DateOnly Date { get; set; }
|
||||
|
||||
public int TemperatureC { get; set; }
|
||||
|
||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||
|
||||
public string? Summary { get; set; }
|
||||
}
|
||||
}
|
||||
8
Accounting/appsettings.Development.json
Normal file
8
Accounting/appsettings.Development.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
12
Accounting/appsettings.json
Normal file
12
Accounting/appsettings.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"ConnectionStrings": {
|
||||
"DefaultConnection": "Server=Oemansv7Win;Database=AccountingDb;Persist Security Info=True;User ID=sa;Password=SAOemansv7SA;Trust Server Certificate=True"
|
||||
},
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
25
AccountingApi.sln
Normal file
25
AccountingApi.sln
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.9.34728.123
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounting", "Accounting\Accounting.csproj", "{EA69CE3F-020D-482B-82DB-3A5141E67774}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{EA69CE3F-020D-482B-82DB-3A5141E67774}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EA69CE3F-020D-482B-82DB-3A5141E67774}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EA69CE3F-020D-482B-82DB-3A5141E67774}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EA69CE3F-020D-482B-82DB-3A5141E67774}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {64DE64BD-428B-4C70-91FB-494CCAB60474}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
Reference in New Issue
Block a user