Commit f6e4f570 authored by Karl Kallas's avatar Karl Kallas
Browse files

init

parents
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ContentModelStore">
<e p="$USER_HOME$/Library/Caches/Rider2018.2/extResources" t="IncludeRecursive" />
<e p="$USER_HOME$/Library/Caches/Rider2018.2/resharper-host/local/Transient/ReSharperHost/v182/SolutionCaches/_MonitoringCarExpenses.285088471.00" t="ExcludeRecursive" />
<e p="$PROJECT_DIR$" t="IncludeFlat">
<e p="DAL" t="IncludeRecursive">
<e p="AppDbContext.cs" t="Include" />
<e p="bin" t="ExcludeRecursive" />
<e p="DAL.csproj" t="IncludeRecursive" />
<e p="Migrations" t="Include">
<e p="20190111114905_InitialDbCreation.cs" t="Include" />
<e p="20190111114905_InitialDbCreation.Designer.cs" t="Include" />
<e p="20190111115040_InitialDbCreation.cs" t="Include" />
<e p="20190111115040_InitialDbCreation.Designer.cs" t="Include" />
<e p="AppDbContextModelSnapshot.cs" t="Include" />
</e>
<e p="obj" t="ExcludeRecursive">
<e p="Debug" t="Include">
<e p="netstandard2.0" t="Include">
<e p="DAL.AssemblyInfo.cs" t="Include" />
</e>
</e>
</e>
</e>
<e p="Domain" t="IncludeRecursive">
<e p="bin" t="ExcludeRecursive" />
<e p="Car.cs" t="Include" />
<e p="Domain.csproj" t="IncludeRecursive" />
<e p="ExpenseCategory.cs" t="Include" />
<e p="obj" t="ExcludeRecursive">
<e p="Debug" t="Include">
<e p="netstandard2.0" t="Include">
<e p="Domain.AssemblyInfo.cs" t="Include" />
</e>
</e>
</e>
<e p="Price.cs" t="Include" />
</e>
<e p="MonitoringCarExpenses.sln" t="IncludeFlat" />
<e p="packages" t="ExcludeRecursive" />
<e p="WebApp" t="IncludeRecursive">
<e p="appsettings.Development.json" t="Include" />
<e p="appsettings.json" t="Include" />
<e p="bin" t="ExcludeRecursive" />
<e p="obj" t="ExcludeRecursive">
<e p="Debug" t="Include">
<e p="netcoreapp2.2" t="Include">
<e p="WebApp.AssemblyInfo.cs" t="Include" />
</e>
</e>
</e>
<e p="Pages" t="Include">
<e p="_ViewImports.cshtml" t="Include" />
<e p="_ViewStart.cshtml" t="Include" />
<e p="Cars" t="Include">
<e p="Create.cshtml" t="Include" />
<e p="Create.cshtml.cs" t="Include" />
<e p="Delete.cshtml" t="Include" />
<e p="Delete.cshtml.cs" t="Include" />
<e p="Details.cshtml" t="Include" />
<e p="Details.cshtml.cs" t="Include" />
<e p="Edit.cshtml" t="Include" />
<e p="Edit.cshtml.cs" t="Include" />
<e p="Index.cshtml" t="Include" />
<e p="Index.cshtml.cs" t="Include" />
</e>
<e p="Categories" t="Include">
<e p="Create.cshtml" t="Include" />
<e p="Create.cshtml.cs" t="Include" />
<e p="Delete.cshtml" t="Include" />
<e p="Delete.cshtml.cs" t="Include" />
<e p="Details.cshtml" t="Include" />
<e p="Details.cshtml.cs" t="Include" />
<e p="Edit.cshtml" t="Include" />
<e p="Edit.cshtml.cs" t="Include" />
<e p="Index.cshtml" t="Include" />
<e p="Index.cshtml.cs" t="Include" />
</e>
<e p="Error.cshtml" t="Include" />
<e p="Error.cshtml.cs" t="Include" />
<e p="Index.cshtml" t="Include" />
<e p="Index.cshtml.cs" t="Include" />
<e p="Prices" t="Include">
<e p="Create.cshtml" t="Include" />
<e p="Create.cshtml.cs" t="Include" />
<e p="Delete.cshtml" t="Include" />
<e p="Delete.cshtml.cs" t="Include" />
<e p="Details.cshtml" t="Include" />
<e p="Details.cshtml.cs" t="Include" />
<e p="Edit.cshtml" t="Include" />
<e p="Edit.cshtml.cs" t="Include" />
<e p="Index.cshtml" t="Include" />
<e p="Index.cshtml.cs" t="Include" />
</e>
<e p="Privacy.cshtml" t="Include" />
<e p="Privacy.cshtml.cs" t="Include" />
<e p="shared" t="Include">
<e p="_CookieConsentPartial.cshtml" t="Include" />
<e p="_Layout.cshtml" t="Include" />
<e p="_ValidationScriptsPartial.cshtml" t="Include" />
</e>
</e>
<e p="Program.cs" t="Include" />
<e p="Properties" t="Include">
<e p="launchSettings.json" t="Include" />
</e>
<e p="Startup.cs" t="Include" />
<e p="WebApp.csproj" t="IncludeRecursive" />
<e p="wwwroot" t="Include">
<e p="css" t="Include">
<e p="site.css" t="Include" />
</e>
<e p="favicon.ico" t="Include" />
<e p="js" t="Include">
<e p="site.js" t="Include" />
</e>
<e p="lib" t="Include">
<e p="bootstrap" t="Include">
<e p="dist" t="Include">
<e p="css" t="Include">
<e p="bootstrap-grid.css" t="Include" />
<e p="bootstrap-grid.css.map" t="Include" />
<e p="bootstrap-grid.min.css" t="Include" />
<e p="bootstrap-grid.min.css.map" t="Include" />
<e p="bootstrap-reboot.css" t="Include" />
<e p="bootstrap-reboot.css.map" t="Include" />
<e p="bootstrap-reboot.min.css" t="Include" />
<e p="bootstrap-reboot.min.css.map" t="Include" />
<e p="bootstrap.css" t="Include" />
<e p="bootstrap.css.map" t="Include" />
<e p="bootstrap.min.css" t="Include" />
<e p="bootstrap.min.css.map" t="Include" />
</e>
<e p="js" t="Include">
<e p="bootstrap.bundle.js" t="Include" />
<e p="bootstrap.bundle.js.map" t="Include" />
<e p="bootstrap.bundle.min.js" t="Include" />
<e p="bootstrap.bundle.min.js.map" t="Include" />
<e p="bootstrap.js" t="Include" />
<e p="bootstrap.js.map" t="Include" />
<e p="bootstrap.min.js" t="Include" />
<e p="bootstrap.min.js.map" t="Include" />
</e>
</e>
<e p="LICENSE" t="Include" />
</e>
<e p="jquery" t="Include">
<e p="dist" t="Include">
<e p="jquery.js" t="Include" />
<e p="jquery.min.js" t="Include" />
<e p="jquery.min.map" t="Include" />
</e>
<e p="LICENSE.txt" t="Include" />
</e>
<e p="jquery-validation" t="Include">
<e p="dist" t="Include">
<e p="additional-methods.js" t="Include" />
<e p="additional-methods.min.js" t="Include" />
<e p="jquery.validate.js" t="Include" />
<e p="jquery.validate.min.js" t="Include" />
</e>
<e p="LICENSE.md" t="Include" />
</e>
<e p="jquery-validation-unobtrusive" t="Include">
<e p="jquery.validate.unobtrusive.js" t="Include" />
<e p="jquery.validate.unobtrusive.min.js" t="Include" />
<e p="LICENSE.txt" t="Include" />
</e>
</e>
</e>
</e>
</e>
</component>
</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="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/.idea.MonitoringCarExpenses/riderModule.iml" filepath="$PROJECT_DIR$/.idea/.idea.MonitoringCarExpenses/riderModule.iml" />
</modules>
</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
This diff is collapsed.
<?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 AppDbContext : DbContext
{
public DbSet<Car> Cars { get; set; }
public DbSet<ExpenseCategory> Categories { get; set; }
public DbSet<Price> Prices { get; set; }
public AppDbContext(DbContextOptions<AppDbContext> options) : base(options)
{
}
}
}
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Domain\Domain.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.4" />
<PackageReference Include="MySql.Data.EntityFrameworkCore" Version="8.0.13" />
</ItemGroup>
</Project>
// <auto-generated />
using System;
using DAL;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace DAL.Migrations
{
[DbContext(typeof(AppDbContext))]
[Migration("20190111115040_InitialDbCreation")]
partial class InitialDbCreation
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.2.0-rtm-35687");
modelBuilder.Entity("Domain.Car", b =>
{
b.Property<int>("CarId")
.ValueGeneratedOnAdd();
b.Property<int?>("CarId1");
b.Property<string>("Mark")
.IsRequired();
b.Property<string>("Model")
.IsRequired();
b.Property<int>("Year");
b.HasKey("CarId");
b.HasIndex("CarId1");
b.ToTable("Cars");
});
modelBuilder.Entity("Domain.ExpenseCategory", b =>
{
b.Property<int>("ExpenseCategoryId")
.ValueGeneratedOnAdd();
b.Property<string>("ExpenseName")
.IsRequired();
b.HasKey("ExpenseCategoryId");
b.ToTable("Categories");
});
modelBuilder.Entity("Domain.Price", b =>
{
b.Property<int>("PriceId")
.ValueGeneratedOnAdd();
b.Property<int>("CarId");
b.Property<int>("ExpenseCategoryId");
b.Property<int?>("PriceId1");
b.Property<string>("PriceNumber")
.IsRequired();
b.HasKey("PriceId");
b.HasIndex("CarId");
b.HasIndex("ExpenseCategoryId");
b.HasIndex("PriceId1");
b.ToTable("Prices");
});
modelBuilder.Entity("Domain.Car", b =>
{
b.HasOne("Domain.Car")
.WithMany("Cars")
.HasForeignKey("CarId1");
});
modelBuilder.Entity("Domain.Price", b =>
{
b.HasOne("Domain.Car", "Mark")
.WithMany()
.HasForeignKey("CarId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("Domain.ExpenseCategory", "ExpenseName")
.WithMany()
.HasForeignKey("ExpenseCategoryId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("Domain.Price")
.WithMany("PricePlusMark")
.HasForeignKey("PriceId1");
});
#pragma warning restore 612, 618
}
}
}
using Microsoft.EntityFrameworkCore.Migrations;
namespace DAL.Migrations
{
public partial class InitialDbCreation : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Cars",
columns: table => new
{
CarId = table.Column<int>(nullable: false)
.Annotation("MySQL:AutoIncrement", true),
Mark = table.Column<string>(nullable: false),
Model = table.Column<string>(nullable: false),
Year = table.Column<int>(nullable: false),
CarId1 = table.Column<int>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Cars", x => x.CarId);
table.ForeignKey(
name: "FK_Cars_Cars_CarId1",
column: x => x.CarId1,
principalTable: "Cars",
principalColumn: "CarId",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "Categories",
columns: table => new
{
ExpenseCategoryId = table.Column<int>(nullable: false)
.Annotation("MySQL:AutoIncrement", true),
ExpenseName = table.Column<string>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Categories", x => x.ExpenseCategoryId);
});
migrationBuilder.CreateTable(
name: "Prices",
columns: table => new
{
PriceId = table.Column<int>(nullable: false)
.Annotation("MySQL:AutoIncrement", true),
PriceNumber = table.Column<string>(nullable: false),
ExpenseCategoryId = table.Column<int>(nullable: false),
CarId = table.Column<int>(nullable: false),
PriceId1 = table.Column<int>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Prices", x => x.PriceId);
table.ForeignKey(
name: "FK_Prices_Cars_CarId",
column: x => x.CarId,
principalTable: "Cars",
principalColumn: "CarId",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_Prices_Categories_ExpenseCategoryId",
column: x => x.ExpenseCategoryId,
principalTable: "Categories",
principalColumn: "ExpenseCategoryId",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_Prices_Prices_PriceId1",
column: x => x.PriceId1,
principalTable: "Prices",
principalColumn: "PriceId",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_Cars_CarId1",
table: "Cars",
column: "CarId1");
migrationBuilder.CreateIndex(
name: "IX_Prices_CarId",
table: "Prices",
column: "CarId");
migrationBuilder.CreateIndex(
name: "IX_Prices_ExpenseCategoryId",
table: "Prices",
column: "ExpenseCategoryId");
migrationBuilder.CreateIndex(
name: "IX_Prices_PriceId1",
table: "Prices",
column: "PriceId1");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Prices");
migrationBuilder.DropTable(
name: "Cars");
migrationBuilder.DropTable(
name: "Categories");
}
}
}

\ No newline at end of file
This diff is collapsed.
<?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>
{
"version": 1,
"dgSpecHash": "QfAofeJDwL9G6MhSLlEJmWYPc237xlILILTfFZJxsOtIgQ4ZG1UeMqg/C2eDdNfNsgC3cK3J/8CAwm/dcKFG1g==",
"success": true
}
\ 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