Commit 0d6c2bef authored by Andres Käver's avatar Andres Käver
Browse files

razor

parent 4d4b663f
# Default ignored files
/shelf/
/workspace.xml
# Rider ignored files
/projectSettingsUpdater.xml
/contentModel.xml
/modules.xml
/.idea.RazorPagesDemo.iml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ContentModelUserStore">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="com.jetbrains.rider.android.RiderAndroidMiscFileCreationComponent">
<option name="ENSURE_MISC_FILE_EXISTS" value="true" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="RIDER_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$/../.." />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
using System;
using Domain;
using Microsoft.EntityFrameworkCore;
namespace DAL
{
public class ApplicationDbContext : DbContext
{
public DbSet<GpsSession> GpsSessions { get; set; }
public DbSet<GpsLocation> GpsLocations { get; set; }
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
: base(options)
{
}
}
}
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.9" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Domain\Domain.csproj" />
</ItemGroup>
</Project>
// <auto-generated />
using System;
using DAL;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace DAL.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20201030123808_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "3.1.9")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Domain.GpsLocation", b =>
{
b.Property<int>("GpsLocationId")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime2");
b.Property<int>("GpsSessionId")
.HasColumnType("int");
b.Property<double>("Lat")
.HasColumnType("float");
b.Property<double>("Lon")
.HasColumnType("float");
b.HasKey("GpsLocationId");
b.HasIndex("GpsSessionId");
b.ToTable("GpsLocations");
});
modelBuilder.Entity("Domain.GpsSession", b =>
{
b.Property<int>("GpsSessionId")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime2");
b.Property<int>("Duration")
.HasColumnType("int");
b.Property<string>("Name")
.HasColumnType("nvarchar(max)");
b.Property<int>("SessionLength")
.HasColumnType("int");
b.HasKey("GpsSessionId");
b.ToTable("GpsSessions");
});
modelBuilder.Entity("Domain.GpsLocation", b =>
{
b.HasOne("Domain.GpsSession", "GpsSession")
.WithMany("GpsLocations")
.HasForeignKey("GpsSessionId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
#pragma warning restore 612, 618
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace DAL.Migrations
{
public partial class Initial : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "GpsSessions",
columns: table => new
{
GpsSessionId = table.Column<int>(nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Name = table.Column<string>(nullable: true),
CreatedAt = table.Column<DateTime>(nullable: false),
SessionLength = table.Column<int>(nullable: false),
Duration = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_GpsSessions", x => x.GpsSessionId);
});
migrationBuilder.CreateTable(
name: "GpsLocations",
columns: table => new
{
GpsLocationId = table.Column<int>(nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Lat = table.Column<double>(nullable: false),
Lon = table.Column<double>(nullable: false),
CreatedAt = table.Column<DateTime>(nullable: false),
GpsSessionId = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_GpsLocations", x => x.GpsLocationId);
table.ForeignKey(
name: "FK_GpsLocations_GpsSessions_GpsSessionId",
column: x => x.GpsSessionId,
principalTable: "GpsSessions",
principalColumn: "GpsSessionId",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_GpsLocations_GpsSessionId",
table: "GpsLocations",
column: "GpsSessionId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "GpsLocations");
migrationBuilder.DropTable(
name: "GpsSessions");
}
}
}
// <auto-generated />
using System;
using DAL;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace DAL.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
partial class ApplicationDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "3.1.9")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Domain.GpsLocation", b =>
{
b.Property<int>("GpsLocationId")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime2");
b.Property<int>("GpsSessionId")
.HasColumnType("int");
b.Property<double>("Lat")
.HasColumnType("float");
b.Property<double>("Lon")
.HasColumnType("float");
b.HasKey("GpsLocationId");
b.HasIndex("GpsSessionId");
b.ToTable("GpsLocations");
});
modelBuilder.Entity("Domain.GpsSession", b =>
{
b.Property<int>("GpsSessionId")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime2");
b.Property<int>("Duration")
.HasColumnType("int");
b.Property<string>("Name")
.HasColumnType("nvarchar(max)");
b.Property<int>("SessionLength")
.HasColumnType("int");
b.HasKey("GpsSessionId");
b.ToTable("GpsSessions");
});
modelBuilder.Entity("Domain.GpsLocation", b =>
{
b.HasOne("Domain.GpsSession", "GpsSession")
.WithMany("GpsLocations")
.HasForeignKey("GpsSessionId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
#pragma warning restore 612, 618
}
}
}
{
"runtimeTarget": {
"name": ".NETStandard,Version=v2.1/",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETStandard,Version=v2.1": {},
".NETStandard,Version=v2.1/": {
"DAL/1.0.0": {
"dependencies": {
"Domain": "1.0.0",
"Microsoft.EntityFrameworkCore": "3.1.9",
"Microsoft.EntityFrameworkCore.Relational": "3.1.9",
"Microsoft.EntityFrameworkCore.SqlServer": "3.1.9"
},
"runtime": {
"DAL.dll": {}
}
},
"Microsoft.Bcl.AsyncInterfaces/1.1.1": {
"dependencies": {
"System.Threading.Tasks.Extensions": "4.5.4"
},
"runtime": {
"lib/netstandard2.1/Microsoft.Bcl.AsyncInterfaces.dll": {
"assemblyVersion": "1.0.0.0",
"fileVersion": "4.700.20.21406"
}
}
},
"Microsoft.Bcl.HashCode/1.1.0": {
"runtime": {
"lib/netstandard2.1/Microsoft.Bcl.HashCode.dll": {
"assemblyVersion": "1.0.0.0",
"fileVersion": "4.700.19.56404"
}
}
},
"Microsoft.CSharp/4.5.0": {
"runtime": {
"lib/netstandard2.0/Microsoft.CSharp.dll": {
"assemblyVersion": "4.0.4.0",
"fileVersion": "4.6.26515.6"
}
}
},
"Microsoft.Data.SqlClient/1.1.3": {
"dependencies": {
"Microsoft.Identity.Client": "3.0.8",
"Microsoft.Win32.Registry": "4.5.0",
"System.Buffers": "4.5.1",
"System.Configuration.ConfigurationManager": "4.5.0",
"System.Diagnostics.DiagnosticSource": "4.7.1",
"System.Memory": "4.5.4",
"System.Security.Principal.Windows": "4.5.0",
"System.Text.Encoding.CodePages": "4.5.0",
"runtime.native.System.Data.SqlClient.sni": "4.4.0"
},
"runtime": {
"lib/netstandard2.0/Microsoft.Data.SqlClient.dll": {
"assemblyVersion": "1.13.20136.2",
"fileVersion": "1.13.20136.2"
}
}
},
"Microsoft.EntityFrameworkCore/3.1.9": {
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "1.1.1",
"Microsoft.Bcl.HashCode": "1.1.0",
"Microsoft.EntityFrameworkCore.Abstractions": "3.1.9",
"Microsoft.EntityFrameworkCore.Analyzers": "3.1.9",
"Microsoft.Extensions.Caching.Memory": "3.1.9",
"Microsoft.Extensions.DependencyInjection": "3.1.9",
"Microsoft.Extensions.Logging": "3.1.9",
"System.Collections.Immutable": "1.7.1",
"System.ComponentModel.Annotations": "4.7.0",
"System.Diagnostics.DiagnosticSource": "4.7.1"
},
"runtime": {
"lib/netstandard2.0/Microsoft.EntityFrameworkCore.dll": {
"assemblyVersion": "3.1.9.0",
"fileVersion": "3.100.920.47303"
}
}
},
"Microsoft.EntityFrameworkCore.Abstractions/3.1.9": {
"runtime": {
"lib/netstandard2.0/Microsoft.EntityFrameworkCore.Abstractions.dll": {
"assemblyVersion": "3.1.9.0",
"fileVersion": "3.100.920.47303"
}
}
},
"Microsoft.EntityFrameworkCore.Analyzers/3.1.9": {},
"Microsoft.EntityFrameworkCore.Relational/3.1.9": {
"dependencies": {
"Microsoft.EntityFrameworkCore": "3.1.9"
},
"runtime": {
"lib/netstandard2.0/Microsoft.EntityFrameworkCore.Relational.dll": {
"assemblyVersion": "3.1.9.0",
"fileVersion": "3.100.920.47303"
}
}
},
"Microsoft.EntityFrameworkCore.SqlServer/3.1.9": {
"dependencies": {
"Microsoft.Data.SqlClient": "1.1.3",
"Microsoft.EntityFrameworkCore.Relational": "3.1.9"
},
"runtime": {
"lib/netstandard2.0/Microsoft.EntityFrameworkCore.SqlServer.dll": {
"assemblyVersion": "3.1.9.0",
"fileVersion": "3.100.920.47303"
}
}
},
"Microsoft.Extensions.Caching.Abstractions/3.1.9": {
"dependencies": {
"Microsoft.Extensions.Primitives": "3.1.9"
},
"runtime": {
"lib/netstandard2.0/Microsoft.Extensions.Caching.Abstractions.dll": {
"assemblyVersion": "3.1.9.0",
"fileVersion": "3.100.920.47302"
}
}
},
"Microsoft.Extensions.Caching.Memory/3.1.9": {
"dependencies": {
"Microsoft.Extensions.Caching.Abstractions": "3.1.9",
"Microsoft.Extensions.DependencyInjection.Abstractions": "3.1.9",
"Microsoft.Extensions.Logging.Abstractions": "3.1.9",
"Microsoft.Extensions.Options": "3.1.9"
},
"runtime": {
"lib/netstandard2.0/Microsoft.Extensions.Caching.Memory.dll": {
"assemblyVersion": "3.1.9.0",
"fileVersion": "3.100.920.47302"
}
}
},
"Microsoft.Extensions.Configuration/3.1.9": {
"dependencies": {
"Microsoft.Extensions.Configuration.Abstractions": "3.1.9"
},
"runtime": {
"lib/netstandard2.0/Microsoft.Extensions.Configuration.dll": {
"assemblyVersion": "3.1.9.0",
"fileVersion": "3.100.920.47302"
}
}
},
"Microsoft.Extensions.Configuration.Abstractions/3.1.9": {
"dependencies": {
"Microsoft.Extensions.Primitives": "3.1.9"
},
"runtime": {
"lib/netstandard2.0/Microsoft.Extensions.Configuration.Abstractions.dll": {
"assemblyVersion": "3.1.9.0",
"fileVersion": "3.100.920.47302"
}
}
},
"Microsoft.Extensions.Configuration.Binder/3.1.9": {
"dependencies": {
"Microsoft.Extensions.Configuration": "3.1.9"
},
"runtime": {
"lib/netstandard2.0/Microsoft.Extensions.Configuration.Binder.dll": {
"assemblyVersion": "3.1.9.0",
"fileVersion": "3.100.920.47302"
}
}
},
"Microsoft.Extensions.DependencyInjection/3.1.9": {
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "3.1.9"
},
"runtime": {
"lib/netstandard2.1/Microsoft.Extensions.DependencyInjection.dll": {
"assemblyVersion": "3.1.9.0",
"fileVersion": "3.100.920.47302"
}
}
},
"Microsoft.Extensions.DependencyInjection.Abstractions/3.1.9": {
"runtime": {
"lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": {
"assemblyVersion": "3.1.9.0",
"fileVersion": "3.100.920.47302"
}
}
},
"Microsoft.Extensions.Logging/3.1.9": {
"dependencies": {
"Microsoft.Extensions.Configuration.Binder": "3.1.9",
"Microsoft.Extensions.DependencyInjection": "3.1.9",
"Microsoft.Extensions.Logging.Abstractions": "3.1.9",
"Microsoft.Extensions.Options": "3.1.9"
},
"runtime": {
"lib/netstandard2.0/Microsoft.Extensions.Logging.dll": {
"assemblyVersion": "3.1.9.0",
"fileVersion": "3.100.920.47302"
}
}
},
"Microsoft.Extensions.Logging.Abstractions/3.1.9": {
"runtime": {
"lib/netstandard2.0/Microsoft.Extensions.Logging.Abstractions.dll": {
"assemblyVersion": "3.1.9.0",
"fileVersion": "3.100.920.47302"
}
}
},
"Microsoft.Extensions.Options/3.1.9": {
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "3.1.9",
"Microsoft.Extensions.Primitives": "3.1.9",
"System.ComponentModel.Annotations": "4.7.0"
},
"runtime": {
"lib/netstandard2.0/Microsoft.Extensions.Options.dll": {
"assemblyVersion": "3.1.9.0",
"fileVersion": "3.100.920.47302"
}
}
},
"Microsoft.Extensions.Primitives/3.1.9": {
"dependencies": {
"System.Memory": "4.5.4",
"System.Runtime.CompilerServices.Unsafe": "4.7.1"
},
"runtime": {
"lib/netstandard2.0/Microsoft.Extensions.Primitives.dll": {
"assemblyVersion": "3.1.9.0",
"fileVersion": "3.100.920.47302"
}
}
},
"Microsoft.Identity.Client/3.0.8": {
"dependencies": {