X Tutup
The Wayback Machine - https://web.archive.org/web/20201223175725/https://github.com/damienbod/AspNetCoreMultipleProject
Skip to content
main
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
Nov 8, 2020
Jan 10, 2020
Nov 8, 2020
Jan 10, 2020

README.md

ASP.NET Core API with Entity Framework Core and Swagger

https://github.com/damienbod/AspNetCoreMultipleProject

Build
.NET Core Build status

Posts in this series:

History

2020-11-08 Updated nuget packages

2020-10-10 Updated nuget packages

2020-01-10 Updated to .NET Core 3.1

2019-03-03 Updated NuGet packages

2018-12-04 Updated to .NET Core 2.2

2018-11-28 Updated to .NET Core 2.2 preview

2018-11-25 Updated NuGet packages, async everything, added swagger

2018-06-16 Updated to .NET Core 2.1

Setup

MS SQL Server

dotnet restore

dotnet ef migrations add microsoftSql --context DomainModelMsSqlServerContext

dotnet ef database update --context DomainModelMsSqlServerContext

-or-

Add-Migration "microsoftSql" -c DomainModelMsSqlServerContext

Update-Database -c DomainModelMsSqlServerContext

SQLite

dotnet restore

dotnet ef migrations add sqliteMigration --context DomainModelSqliteContext

dotnet ef database update --context DomainModelSqliteContext

-or-

Add-Migration "sqliteMigration" -c DomainModelSqliteContext

Update-Database -c DomainModelSqliteContext

PostGreSQL

dotnet restore

dotnet ef migrations add postgresqlMigration --context DomainModelPostgreSqlContext

dotnet ef database update --context DomainModelPostgreSqlContext

-or-

Add-Migration "postgresqlMigration" -c DomainModelPostgreSqlContext

Update-Database -c DomainModelPostgreSqlContext

MySQL

dotnet restore

dotnet ef migrations add mySqlMigration --context DomainModelMySqlContext

dotnet ef database update --context DomainModelMySqlContext

-or-

Add-Migration "mySqlMigration" -c DomainModelMySqlContext

Update-Database -c DomainModelMySqlContext

Testing

https://localhost:44388/api/dataeventrecords Context-Type: application/json

{ "DataEventRecordId":0, "Name":"Funny data more", "Description":"no", "Timestamp":"2015-12-27T08:31:35Z", "SourceInfo": { "SourceInfoId":0, "Name":"Beauty", "Description":"first Source", "Timestamp":"2015-12-23T08:31:35+01:00", "DataEventRecords":[] }, "SourceInfoId": 0 }

GET

http://localhost:44388/api/dataeventrecords/SourceInfos?withChildren=true

You can’t perform that action at this time.
X Tutup