Exemplo n.º 1
0
        public void Post([FromBody] WorldCupVm wc)
        {
            var worldCupFsharpToSave = new WorldCupFsharp(
                WorldCupId.NewWorldCupId(Guid.NewGuid()),
                YearModule.create(wc.Year),
                WorldCupHostModule.create(wc.Host),
                Country.NewCountry(wc.Winner)
                );

            Action <string, IDictionary <string, object> > writeData = _postgresConnection.writeData;
            var fSharpWriteData = FuncConvert.FromAction(writeData);


            WorldCupFsharpRepositoryModule.save(fSharpWriteData, worldCupFsharpToSave);
        }