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
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="GetEFProjectMetadata" Condition="">
<MSBuild Condition=" '$(TargetFramework)' == '' "
Projects="$(MSBuildProjectFile)"
Targets="GetEFProjectMetadata"
Properties="TargetFramework=$(TargetFrameworks.Split(';')[0]);EFProjectMetadataFile=$(EFProjectMetadataFile)" />
<ItemGroup Condition=" '$(TargetFramework)' != '' ">
<EFProjectMetadata Include="AssemblyName: $(AssemblyName)" />
<EFProjectMetadata Include="Language: $(Language)" />
<EFProjectMetadata Include="OutputPath: $(OutputPath)" />
<EFProjectMetadata Include="Platform: $(Platform)" />
<EFProjectMetadata Include="PlatformTarget: $(PlatformTarget)" />
<EFProjectMetadata Include="ProjectAssetsFile: $(ProjectAssetsFile)" />
<EFProjectMetadata Include="ProjectDir: $(ProjectDir)" />
<EFProjectMetadata Include="RootNamespace: $(RootNamespace)" />
<EFProjectMetadata Include="RuntimeFrameworkVersion: $(RuntimeFrameworkVersion)" />
<EFProjectMetadata Include="TargetFileName: $(TargetFileName)" />
<EFProjectMetadata Include="TargetFrameworkMoniker: $(TargetFrameworkMoniker)" />
</ItemGroup>
<WriteLinesToFile Condition=" '$(TargetFramework)' != '' "
File="$(EFProjectMetadataFile)"
Lines="@(EFProjectMetadata)" />
</Target>
</Project>
{
"format": 1,
"restore": {
"/Users/akaver/Development/TalTech/csharp-2020-fall/course-materials/demos/RazorPagesDemo/DAL/DAL.csproj": {}
},
"projects": {
"/Users/akaver/Development/TalTech/csharp-2020-fall/course-materials/demos/RazorPagesDemo/DAL/DAL.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/Users/akaver/Development/TalTech/csharp-2020-fall/course-materials/demos/RazorPagesDemo/DAL/DAL.csproj",
"projectName": "DAL",
"projectPath": "/Users/akaver/Development/TalTech/csharp-2020-fall/course-materials/demos/RazorPagesDemo/DAL/DAL.csproj",
"packagesPath": "/Users/akaver/.nuget/packages/",
"outputPath": "/Users/akaver/Development/TalTech/csharp-2020-fall/course-materials/demos/RazorPagesDemo/DAL/obj/",
"projectStyle": "PackageReference",
"fallbackFolders": [
"/usr/local/share/dotnet/sdk/NuGetFallbackFolder"
],
"configFilePaths": [
"/Users/akaver/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"netstandard2.1"
],
"sources": {
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"netstandard2.1": {
"projectReferences": {
"/Users/akaver/Development/TalTech/csharp-2020-fall/course-materials/demos/RazorPagesDemo/Domain/Domain.csproj": {
"projectPath": "/Users/akaver/Development/TalTech/csharp-2020-fall/course-materials/demos/RazorPagesDemo/Domain/Domain.csproj"
}
}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"netstandard2.1": {
"dependencies": {
"Microsoft.EntityFrameworkCore": {
"target": "Package",
"version": "[3.1.9, )"
},
"Microsoft.EntityFrameworkCore.Relational": {
"target": "Package",
"version": "[3.1.9, )"
},
"Microsoft.EntityFrameworkCore.SqlServer": {
"target": "Package",
"version": "[3.1.9, )"
}
},
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"NETStandard.Library": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/3.1.403/RuntimeIdentifierGraph.json"
}
}
},
"/Users/akaver/Development/TalTech/csharp-2020-fall/course-materials/demos/RazorPagesDemo/Domain/Domain.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/Users/akaver/Development/TalTech/csharp-2020-fall/course-materials/demos/RazorPagesDemo/Domain/Domain.csproj",
"projectName": "Domain",
"projectPath": "/Users/akaver/Development/TalTech/csharp-2020-fall/course-materials/demos/RazorPagesDemo/Domain/Domain.csproj",
"packagesPath": "/Users/akaver/.nuget/packages/",
"outputPath": "/Users/akaver/Development/TalTech/csharp-2020-fall/course-materials/demos/RazorPagesDemo/Domain/obj/",
"projectStyle": "PackageReference",
"fallbackFolders": [
"/usr/local/share/dotnet/sdk/NuGetFallbackFolder"
],
"configFilePaths": [
"/Users/akaver/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"netstandard2.1"
],
"sources": {
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"netstandard2.1": {
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"netstandard2.1": {
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"NETStandard.Library": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/3.1.403/RuntimeIdentifierGraph.json"
}
}
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/Users/akaver/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/Users/akaver/.nuget/packages/;/usr/local/share/dotnet/sdk/NuGetFallbackFolder</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.5.0</NuGetToolVersion>
</PropertyGroup>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
</Project>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment