Work in Progress

master
Harald Wolff 2018-08-02 16:50:46 +02:00
parent fad15a12f9
commit b1ffb64e6c
2 changed files with 21 additions and 0 deletions

14
WaWi.cs
View File

@ -43,7 +43,21 @@ namespace sharpwawi
private void TestMapper()
{
Console.WriteLine("TestMapper():");
Console.WriteLine("UpdateScheme():");
Mapper.UpdateScheme();
Part[] parts = new Part[3];
parts[0] = new Part("1P0001", "Ein Teil");
parts[1] = new Part("1P0002", "Ein anderes Teil");
parts[2] = new Part("1P0003", "Ein drittes Teil");
parts[0].ReplacedBy = parts[1];
Mapper.MappingInterface.SaveOrUpdate(parts[0]);
Mapper.MappingInterface.SaveOrUpdate(parts[1]);
Mapper.MappingInterface.SaveOrUpdate(parts[2]);
}

View File

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using mapper.attributes;
namespace sharpwawi.models
{
[MappingConstraint(FieldMappingConstraint = MappingConstraints.ANNOTATEDONLY,PropertyMappingConstraint = MappingConstraints.ANNOTATEDONLY)]
@ -8,6 +9,12 @@ namespace sharpwawi.models
{
public ISet<Assembly> Assemblies { get; private set; } = new HashSet<Assembly>();
[Mapped]
public Assembly CurrentAssembly { get; set; }
[Mapped]
public Part ReplacedBy;
public Part()
{
}