From f731332d8ab1e77fbae6b68d2d4e670d3b2c5e71 Mon Sep 17 00:00:00 2001 From: Harald Wolff Date: Thu, 20 Sep 2018 10:41:26 +0200 Subject: [PATCH] Work in Progess --- WaWi.cs | 4 ++++ models/Part.cs | 1 + www/style.css | 6 +++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/WaWi.cs b/WaWi.cs index 8b8b57d..0d045fe 100644 --- a/WaWi.cs +++ b/WaWi.cs @@ -32,7 +32,11 @@ namespace sharpwawi private void PrepareMapper() { Mapper = new Mapper(new PostgresAdapter("demo", "feuerbach.lupus", "demo", "demo")); + Mapper.Register(typeof(Entity)); Mapper.Register(typeof(Part)); + Mapper.Register(typeof(PartAssembly)); + + Mapper.Prepare(); Mapper.StorageAdapter.Setup(Mapper); } diff --git a/models/Part.cs b/models/Part.cs index 908e21d..d2a4fa7 100644 --- a/models/Part.cs +++ b/models/Part.cs @@ -8,6 +8,7 @@ namespace sharpwawi.models [MappingConstraint(FieldMappingConstraint = MappingConstraints.ANNOTATEDONLY,PropertyMappingConstraint = MappingConstraints.ANNOTATEDONLY)] public class Part : Entity { + [MapManyToOne(ForeignField = "Part", SaveRecursive = true)] public ISet Assemblies { get; private set; } = new HashSet(); [Mapped] diff --git a/www/style.css b/www/style.css index b3efbdc..a0697d6 100644 --- a/www/style.css +++ b/www/style.css @@ -37,8 +37,12 @@ td { padding-right: 20px; padding-top: 5px; padding-bottom: 3px; + border-bottom: 1px solid #6fb9df; +} - border-bottom: 1px dotted black; +td + td { + border-left: 1px solid #b4d9ec; + padding-left: 5px; } thead > tr > td{